gcc/testsuite/g++.dg/modules/using-18_a.C
raw| 1 | // { dg-additional-options "-fmodules-ts -Wno-global-module" } |
| 2 | // { dg-module-cmi M } |
| 3 | // Test revealing non-exported declarations still prevents |
| 4 | // needed GMF declarations from being discarded |
| 5 | |
| 6 | module; |
| 7 | |
| 8 | struct A {}; |
| 9 | int f(); |
| 10 | |
| 11 | namespace ns { |
| 12 | struct B {}; |
| 13 | int g(); |
| 14 | } |
| 15 | |
| 16 | extern "C" int h(); |
| 17 | namespace ns { |
| 18 | extern "C" int h(); |
| 19 | } |
| 20 | |
| 21 | export module M; |
| 22 | |
| 23 | using ::A; |
| 24 | using ::f; |
| 25 | |
| 26 | using ns::B; |
| 27 | using ns::g; |
| 28 | |
| 29 | using ns::h; |