Merged r157653 through r157895 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / ext / visibility / pragma-override2.C
blobf566cd2f4191099cb8933c3742d2687ac000fd8f
1 /* Test that #pragma GCC visibility does not override class member specific settings. */
2 /* { dg-do compile } */
3 /* { dg-require-visibility "internal" } */
4 /* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } } } } */
5 /* { dg-final { scan-assembler "\\.(internal|hidden).*Foo.methodEv" { target *-*-solaris2* } } } */
7 #pragma GCC visibility push(hidden)
8 class Foo
10   __attribute__ ((visibility ("internal"))) void method();
12 #pragma GCC visibility pop
14 void Foo::method() { }