// PR c++/24511 - [DR 470] explicit instantiation/extern template unsats // on symbols defined later // { dg-do compile } template struct S { T foo (); T bar (); }; template T S::foo () { return T (); } #ifndef MAIN // This part is being tested by the dg-final directive. template struct S; #else // This part is not being tested. extern template struct S; int main () { return S().foo () + S().bar (); } #endif template T S::bar () { return T (); } // { dg-final { scan-assembler-not "\\\*UND\\\*\[^\n]*_Z1fIiEvPT_" } }