| 1 |
// { dg-additional-options "-fmodules-ts -fdump-lang-module" } |
| 2 |
|
| 3 |
// Check some lazy loading |
| 4 |
|
| 5 |
import foo; |
| 6 |
|
| 7 |
int main () |
| 8 |
{ |
| 9 |
bar (); |
| 10 |
|
| 11 |
baz (); |
| 12 |
|
| 13 |
return 0; |
| 14 |
} |
| 15 |
|
| 16 |
// { dg-final { scan-lang-dump {Lazily binding '::bar'@'foo' section} "module" } } |
| 17 |
// { dg-final { scan-lang-dump {Lazily binding '::baz'@'foo' section} "module" } } |
| 18 |
// quux is not referenced, so never loaded |
| 19 |
// { dg-final { scan-lang-dump {Bindings '::quux' section} "module" } } |
| 20 |
// { dg-final { scan-lang-dump-not {Lazily binding '::quux'@'foo' section} "module" } } |
| 21 |
// { dg-final { scan-lang-dump-not {Read -[0-9]* function_decl:'::quux'} "module" } } |