blob: 3bfb6394d565d7d448e73ca41298866a92f251a3 [file] [log] [blame]
// { dg-additional-options {-fmodules-ts -fdump-lang-module-graph-blocks} }
export module TPL;
// { dg-module-cmi TPL }
export template <typename T> int foo (T x)
{
return int (x);
}
// Body is emitted in module-unit itself
template <> int foo<int> (int y)
{
return 0;
}
// { dg-final { scan-lang-dump {Dependencies of specialization function_decl:'::foo<int>'} module } }
// { dg-final { scan-lang-dump-not {Depending definition function_decl:'::foo<int>'} module } }
// { dg-final { scan-lang-dump {Cluster members:\n \[0\]=specialization declaration '::foo<int>'} module } }
// { dg-final { scan-lang-dump {Pending specialization '::foo<int>' entity:[0-9]* section:. keyed to '::foo'} module } }
// { dg-final { scan-assembler {_Z3fooIiEiT_:} } }