| 1 |
// { dg-module-do run } |
| 2 |
// { dg-additional-options {-fmodules-ts -fdump-lang-module-blocks-uid-alias} } |
| 3 |
|
| 4 |
export module foo; |
| 5 |
// { dg-module-cmi foo } |
| 6 |
|
| 7 |
inline int baz (int i) |
| 8 |
{ |
| 9 |
return i; |
| 10 |
} |
| 11 |
|
| 12 |
export template <typename T> |
| 13 |
inline int foo (T t) |
| 14 |
{ |
| 15 |
return baz (t); |
| 16 |
} |
| 17 |
|
| 18 |
export inline void user () |
| 19 |
{ |
| 20 |
foo (1); |
| 21 |
} |
| 22 |
|
| 23 |
// { dg-final { scan-lang-dump {\[0\]=specialization definition '::foo<int>'} module } } |
| 24 |
// { dg-final { scan-lang-dump {Writing:-[0-9]*'s named merge key \(decl\) function_decl:'::baz'} module } } |
| 25 |
// { dg-final { scan-lang-dump {Writing:-[0-9]*'s decl spec merge key \(specialization\) function_decl:'::foo<int>'} module } } |
| 26 |
// { dg-final { scan-lang-dump {Writing:-[0-9]*'s decl spec merge key \(specialization\) function_decl:'::foo<int>'} module } } |