URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do link }
|
// { dg-do link }
|
// This test should get a linker error for the reference to A::i.
|
// This test should get a linker error for the reference to A::i.
|
// { dg-prune-output "ld: symbol" }
|
// { dg-prune-output "ld: symbol" }
|
// { dg-message "i" "" { target *-*-* } 0 }
|
// { dg-message "i" "" { target *-*-* } 0 }
|
|
|
template struct B { static const int i = 3; };
|
template struct B { static const int i = 3; };
|
template struct A { static const int i = B::i; };
|
template struct A { static const int i = B::i; };
|
const int *p = &A::i;
|
const int *p = &A::i;
|
|
|
int main ()
|
int main ()
|
{
|
{
|
// Examine p to prevent optimising linkers from discarding it.
|
// Examine p to prevent optimising linkers from discarding it.
|
return (p != 0);
|
return (p != 0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.