OSDN Git Service

* g++.old-deja/g++.other/eh4.C: Fix typo.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / static16.C
1 // Test that we properly evaluate the object parameter when accessing static
2 // members.
3
4 struct A {
5   static void f () {}
6   static int i;
7 };
8
9 int A::i;
10
11 int c = 0;
12
13 A g ()
14 {
15   ++c;
16   return A();
17 }
18
19 int main ()
20 {
21   g().f();
22   g().i = 42;
23   return (c != 2);
24 }