| 1 |
// { dg-additional-options "-fmodules-ts -fdump-lang-module -Wno-pedantic" } |
| 2 |
|
| 3 |
module; |
| 4 |
# 5 "gmf" 1 |
| 5 |
namespace not_exported |
| 6 |
{ |
| 7 |
// not in purview |
| 8 |
} |
| 9 |
# 10 "" 2 |
| 10 |
export module foo; |
| 11 |
// { dg-module-cmi foo } |
| 12 |
|
| 13 |
namespace explicit_export |
| 14 |
{ |
| 15 |
} |
| 16 |
|
| 17 |
namespace implicit_export |
| 18 |
{ |
| 19 |
export int bob (); |
| 20 |
} |
| 21 |
|
| 22 |
namespace also_not_exported |
| 23 |
{ |
| 24 |
int bob (); |
| 25 |
} |
| 26 |
|
| 27 |
export namespace explicit_export |
| 28 |
{ |
| 29 |
namespace also_exported |
| 30 |
{ |
| 31 |
} |
| 32 |
} |
| 33 |
|
| 34 |
// { dg-final { scan-lang-dump-not {Writable bindings at '::not_exported'} "module" } } |
| 35 |
// { dg-final { scan-lang-dump {Writing namespace:[0-9] '::also_not_exported', public, purview\n} "module" } } |
| 36 |
// { dg-final { scan-lang-dump {Writing namespace:[0-9] '::implicit_export', public, purview, export\n} "module" } } |
| 37 |
// { dg-final { scan-lang-dump {Writing namespace:[0-9] '::explicit_export', public, purview, export\n} "module" } } |
| 38 |
// { dg-final { scan-lang-dump {Writing namespace:[0-9] '::explicit_export::also_exported', public, purview, export\n} "module" } } |
| 39 |
// { dg-final { scan-lang-dump-not {Writing namespace:[0-9] '::not_exported'} "module" } } |
| 40 |
// { dg-final { scan-lang-dump-not {Writing namespace:[0-9] '::std'} "module" } } |