// { dg-do link } // This test should get a linker error for the reference to A::i. // { dg-prune-output "ld: symbol" } // { dg-message "i" "" { target *-*-* } 0 } template struct B { static const int i = 3; }; template struct A { static const int i = B::i; }; const int *p = &A::i; int main () { // Examine p to prevent optimising linkers from discarding it. return (p != 0); }