OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.mike / p7868.C
1 // Build don't link:
2 // prms-id: 7868
3
4 struct DIAGTYP {
5 };
6 struct DIAGTYP1 {
7   struct DIAGTYP;
8   void bar() { new struct DIAGTYP; }    // ERROR - undefined
9   void foo() { new struct DIAGTYP1; }
10 };
11
12 int main () {
13   struct DIAGTYP;
14   struct DIAGTYP  *lerror_desc;
15   lerror_desc= new struct DIAGTYP;      // ERROR - undefined
16 }
17
18 void foo () {
19   struct DIAGTYP  *lerror_desc;
20   lerror_desc= new struct DIAGTYP;
21 }