| 1 |
// { dg-do compile { target arm_eabi } } |
| 2 |
// { dg-require-dll "" } |
| 3 |
// { dg-options "-fvisibility=hidden" } |
| 4 |
|
| 5 |
/* From ARM C++ ABI \S 3.2.5.5: |
| 6 |
|
| 7 |
A class should be exported unless explicitly tagged otherwise. |
| 8 |
|
| 9 |
This admonition applies even on DLL-based systems where hidden |
| 10 |
visibility is the default. We want -fvisibility=hidden to behave |
| 11 |
identically to the situation where hidden visibility is the |
| 12 |
hard-wired default. So, both A and B are exported classes. |
| 13 |
|
| 14 |
Furthermore: |
| 15 |
|
| 16 |
If CAG symbol Y names one of the impedimenta associated with an |
| 17 |
exported class X: |
| 18 |
|
| 19 |
... |
| 20 |
|
| 21 |
* Otherwise, if X has no key function: |
| 22 |
|
| 23 |
- Y is exported from ... each DLL that refers to X and uses Y. |
| 24 |
|
| 25 |
So, the type-info and virtual-table symbols associated with A and B |
| 26 |
must be exported. */ |
| 27 |
|
| 28 |
// { dg-final { scan-not-hidden "_ZTI1A" } } |
| 29 |
// { dg-final { scan-not-hidden "_ZTS1A" } } |
| 30 |
// { dg-final { scan-not-hidden "_ZTV1B" } } |
| 31 |
// { dg-final { scan-not-hidden "_ZTI1B" } } |
| 32 |
// { dg-final { scan-not-hidden "_ZTS1B" } } |
| 33 |
|
| 34 |
struct A {}; |
| 35 |
struct B : virtual public A {}; |
| 36 |
B b; |