blob: d1d3ba486eba9f0198e9bfce6bf0139275e83df3 (
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
|
// Tests for various visibility mismatch situations.
// { dg-require-visibility "" }
// { dg-final { scan-not-hidden "_ZN1A1fEv" } }
struct __attribute ((visibility ("hidden"))) A
{
// This is OK, A::f gets default visibility.
__attribute ((visibility ("default"))) void f ();
};
void A::f() { }
// This gets a warning because B objects might rely
// on hidden symbols from A.
struct B // { dg-warning "visibility" }
{
A a;
};
// This one has explicit visibility, so it doesn't get a warning.
struct __attribute ((visibility ("default"))) C
{
A a;
};
|