URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [const2.C] - Rev 305
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do link }
// This test should get a linker error for the reference to A<int>::i.
// { dg-prune-output "ld: symbol" }
// { dg-message "i" "" { target *-*-* } 0 }
template <class T> struct B { static const int i = 3; };
template <class T> struct A { static const int i = B<T>::i; };
const int *p = &A<int>::i;
int main ()
{
// Examine p to prevent optimising linkers from discarding it.
return (p != 0);
}
Go to most recent revision | Compare with Previous | Blame | View Log