37 lines
753 B
Diff
37 lines
753 B
Diff
2007-09-06 Jason Merrill <jason@redhat.com>
|
|
|
|
* g++.dg/ext/visibility/guard1.C: New test.
|
|
|
|
--- gcc/testsuite/g++.dg/ext/visibility/guard1.C (revision 0)
|
|
+++ gcc/testsuite/g++.dg/ext/visibility/guard1.C (revision 128226)
|
|
@@ -0,0 +1,29 @@
|
|
+// { dg-options "-fvisibility=hidden" }
|
|
+// { dg-require-visibility "" }
|
|
+// { dg-final { scan-not-hidden "_ZGVZN5otherclEvE4s_cd" } }
|
|
+
|
|
+extern "C" int printf (const char *, ...);
|
|
+
|
|
+#define DLLEXPORT __attribute__ ((visibility("default")))
|
|
+
|
|
+struct class_data
|
|
+{
|
|
+ int apple;
|
|
+ class_data() { printf("non trivial ctor\n"); }
|
|
+};
|
|
+
|
|
+struct DLLEXPORT other
|
|
+{
|
|
+ class_data* operator ()()
|
|
+ {
|
|
+ static class_data s_cd;
|
|
+ return &s_cd;
|
|
+ }
|
|
+};
|
|
+
|
|
+int main()
|
|
+{
|
|
+ other aFoo;
|
|
+ aFoo();
|
|
+ return 0;
|
|
+}
|