gcc/testsuite/g++.dg/modules/virt-5_a.C
raw| 1 | // { dg-additional-options "-fmodules-ts" } |
| 2 | // { dg-module-cmi M } |
| 3 | |
| 4 | export module M; |
| 5 | |
| 6 | struct C {}; |
| 7 | struct B : virtual C {}; |
| 8 | |
| 9 | // Despite no non-inline key function, this is still a dynamic class |
| 10 | // and so by the Itanium ABI 5.2.3 should be uniquely emitted in this TU |
| 11 | export struct A : B { |
| 12 | inline A (int) {} |
| 13 | }; |
| 14 | |
| 15 | // { dg-final { scan-assembler {_ZTTW1M1A:} } } |
| 16 | // { dg-final { scan-assembler {_ZTVW1M1A:} } } |