summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/visibility/fvisibility-override2.C
blob: 4b4b54d5a10e61fe50ffd4c13631de0a6a9594f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* Test that -fvisibility does not override class member specific settings. */
/* { dg-do compile } */
/* { dg-require-visibility "internal" } */
/* { dg-options "-fvisibility=hidden" } */
/* { dg-final { scan-not-hidden "Foo.methodEv" } } */

class Foo
{
  __attribute__ ((visibility ("internal"))) void method();
};

void Foo::method() { }