2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.robertl / eb102.C
blobc82fd56d9896bada3a37a4a89918e71e12438dc1
1 // { dg-do run  }
2 // Error: intenral compiler error on 1998/05/28 snapshot.
3 #include <stdio.h>
4 #include <stdlib.h>
6 void evilRises (void **ptr)
8     int *pi;
10     pi = new int;
12     *pi = 0;
14     *ptr = (void *)pi;
17 int main (int argc, char *argv[])
19 #ifdef WORKAROUND
20     union foo
21 #else
22     union
23 #endif
24     {
25         int a;
26         int b;
27         int c;
28     } *fred, barney;
30     evilRises((void **)&fred);
32     barney = *fred;
34     return EXIT_SUCCESS;