// Test that 'static template' instantiates statics. // Special g++ Options: -g -fno-implicit-templates // Ignore the 'ld returned 1' message from collect2. // excess errors test - XFAIL *-*-* template struct A { static T t; }; template T A::t = 0; static template struct A; // These functions must be defined in a single line, so that, even if // constants or pointers are placed in the code section (for example, // on the SH), we still get the same line numbers. void test_int() { A::t = 42; } // gets bogus error void test_char() { A::t = 42; } // ERROR - not instantiated XFAIL *-*-irix* *-*-hpux* // Irix's default linker does not produce line numbers so XFAIL it. // Similarly for HP's linker int main () { test_int (); test_char (); }