OpenCores
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.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [const2.C] - Diff between revs 305 and 338

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);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.