annotate gcc/testsuite/g++.dg/ext/visibility/visibility-9.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // Test that dllimport'd functions have default visibility.
kono
parents:
diff changeset
2 // { dg-require-visibility "" }
kono
parents:
diff changeset
3 // { dg-require-dll "" }
kono
parents:
diff changeset
4 // { dg-options "-fvisibility=hidden" }
kono
parents:
diff changeset
5 // { dg-final { scan-not-hidden "_Z2f1v" } }
kono
parents:
diff changeset
6 // { dg-final { scan-not-hidden "_ZN1S2f3Ev" } }
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 extern void __attribute__((dllimport)) f1();
kono
parents:
diff changeset
9 void f2() {
kono
parents:
diff changeset
10 f1();
kono
parents:
diff changeset
11 }
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 struct __attribute__((visibility("hidden")) S1 {
kono
parents:
diff changeset
14 __attribute__((dllimport)) void f3();
kono
parents:
diff changeset
15 };
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 void f4() {
kono
parents:
diff changeset
18 S1 s1;
kono
parents:
diff changeset
19 s1.f3();
kono
parents:
diff changeset
20 }
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 struct S2 {
kono
parents:
diff changeset
23 __attribute__((dllimport)) void f5();
kono
parents:
diff changeset
24 };
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 void f6() {
kono
parents:
diff changeset
27 S2 s2;
kono
parents:
diff changeset
28 s2.f5();
kono
parents:
diff changeset
29 }