summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/visibility/virtual.C
blob: 770600368de026f37ea5dd36846fc1606dd50975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Test that setting visibility for class affects virtual table, VTT and
   type_info name and node. */
/* { dg-do compile } */
/* { dg-require-visibility "" } */
/* { dg-final { scan-hidden "ZTV3Foo" } } */
/* { dg-final { scan-hidden "ZTT3Foo" } } */
/* { dg-final { scan-hidden "ZTS3Foo" } } */
/* { dg-final { scan-hidden "ZTI3Foo" } } */

struct A { };

class __attribute__ ((visibility ("hidden"))) Foo: virtual public A
{
  virtual void method();
};

void Foo::method() { }