1 // { dg-additional-options {-fmodules-ts -fdump-lang-module-graph-blocks} }
2 
3 export module TPL;
4 // { dg-module-cmi TPL }
5 
foo(T x)6 export template <typename T> int foo (T x)
7 {
8   return int (x);
9 }
10 
11 // Body is emitted in module-unit itself
12 template <> int foo<int> (int y)
13 {
14   return 0;
15 }
16 
17 // { dg-final { scan-lang-dump {Dependencies of specialization function_decl:'::foo<int>'} module } }
18 // { dg-final { scan-lang-dump-not {Depending definition function_decl:'::foo<int>'} module } }
19 // { dg-final { scan-lang-dump {Cluster members:\n  \[0\]=specialization declaration '::foo<int>'} module } }
20 // { dg-final { scan-lang-dump {Pending specialization '::foo<int>' entity:[0-9]* section:. keyed to '::foo'} module } }
21 
22 // { dg-final { scan-assembler {_Z3fooIiEiT_:} } }
23