2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / anon3.C
blobd2964f5aaf4d8483f12d8e3d87cbc7149b5abc7b
1 // { dg-do assemble  }
2 // Bug: g++ dies.
4 class cl {
5 public:
6   cl();
7   void set(void *, char *, int);
8 private:
9   union {
10     float vf;
11     struct ff { // { dg-error "" } nested class in anonymous union
12       void *ptr;
13       char *name;
14       int sz;
15     } *vff;
16   };
19 void cl::set(void *p, char *n, int sz)
21     vff = new ff; // This procude an internal compiler error.
22     vff->ptr = p;
23     vff->name = n;
24     vff->sz = sz;