OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [const2.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do link }
2
// This test should get a linker error for the reference to A::i.
3
// { dg-prune-output "ld: symbol" }
4
// { dg-message "i" "" { target *-*-* } 0 }
5
 
6
template  struct B { static const int i = 3; };
7
template  struct A { static const int i = B::i; };
8
const int *p = &A::i;
9
 
10
int main ()
11
{
12
  // Examine p to prevent optimising linkers from discarding it.
13
  return (p != 0);
14
}

powered by: WebSVN 2.1.0

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