| 1 |
// { dg-additional-options "-fmodules-ts -Wno-global-module" } |
| 2 |
// { dg-module-cmi !bad } |
| 3 |
|
| 4 |
module; |
| 5 |
|
| 6 |
static int x = 123; // { dg-message "declared here with internal linkage" } |
| 7 |
static void f() {} // { dg-message "declared here with internal linkage" } |
| 8 |
using T = struct {}; // { dg-message "declared here with no linkage" } |
| 9 |
|
| 10 |
export module bad; |
| 11 |
|
| 12 |
export using ::x; // { dg-error "does not have external linkage" } |
| 13 |
export using ::f; // { dg-error "does not have external linkage" } |
| 14 |
export using ::T; // { dg-error "does not have external linkage" } |