OSDN Git Service

* typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / reload1.C
1 // { dg-do run  }
2 extern "C" void abort ();
3
4 struct A {
5   unsigned long long u;
6 } *a;
7
8 struct B {
9   unsigned long long v;
10   unsigned long long w ()
11   {
12     return a->u - v;
13   }
14 } b;
15
16 struct C {
17   static unsigned long long x;
18   static void y (unsigned long long z);
19 };
20
21 unsigned long long C::x = 0;
22
23 int main ()
24 {
25   a = new A;
26   b.v = 333418;
27   a->u = 1132270;
28   C::x = 0;
29   C::y (799016);
30 }
31
32 void foo (unsigned long long a, unsigned long long b, unsigned long long c)
33 {
34 }
35
36 void C::y (unsigned long long z)
37 {
38   unsigned long long c = b.w () - x;
39   if (z < b.w ())
40     {
41       if ((long long) c < 0)
42         {
43           foo (b.w (), a->u, b.v);
44           abort ();
45         }
46     }
47 }