summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/visibility/fvisibility-inlines-hidden-3.C
blob: 50885a798ddcf1221543627fe819074b039b9dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* { dg-do compile } */
/* { dg-require-visibility "" } */
/* { dg-options "-fvisibility-inlines-hidden" } */
/* { dg-final { scan-not-hidden "_ZN1IIiE3fooEv" } } */
/* { dg-final { scan-not-hidden "_ZN1OIiE3fooEv" } } */
/* { dg-final { scan-hidden "_ZN1S3fooEv" } } */

template <class T>
struct O {
  static inline void foo() { }
};

template void O<int>::foo();

template <class T>
struct I {
  static inline void foo() { }
};

extern template void I<int>::foo();

struct S {
  static inline void foo() { }
};

void bar() {
  I<int>::foo();
  O<int>::foo();
  S::foo();
}