OSDN Git Service

fix
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / for1.C
1 // Build don't link:
2
3 int i;
4 int j;
5
6 struct S {
7   int operator()(int)
8     {
9       i = 1;
10     }
11
12   typedef int I;
13
14   void f() {
15     for (S I; false; )
16       ;
17     int k = I(3);
18   }
19 };
20
21 typedef int J;
22
23 struct T {
24   int operator()(int)
25     {
26       j = 1;
27     }
28
29   void f() {
30     for (T J; false; )
31       ;
32     int k = J(3);
33   }
34 };
35
36 int main()
37 {
38   S s;
39   s.f();
40   return 2 * i + j;
41 }