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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// Test that we properly evaluate the object parameter when accessing static
3
// members.
4
 
5
struct A {
6
  static void f () {}
7
  static int i;
8
};
9
 
10
int A::i;
11
 
12
int c = 0;
13
 
14
A g ()
15
{
16
  ++c;
17
  return A();
18
}
19
 
20
int main ()
21
{
22
  g().f();
23
  g().i = 42;
24
  return (c != 2);
25
}

powered by: WebSVN 2.1.0

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