2 // Test that a template instantiation has the same linkage as its argument.
3 // { dg-final { scan-assembler "(weak|glob)\[^\n\]*_Z3fooIXadL_Z13external_funcvEEEvv" } }
4 // { dg-final { scan-assembler-not "(weak|glob)\[^\n\]*_Z3fooIXadL_ZL11static_funcvEEEvv" { xfail powerpc-*-aix* } } }
6 template<void (*fptr)(void)>
9 static void static_func() {}
10 void external_func() { }
14 #if __cplusplus > 199711L
17 foo<&external_func>();