2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.ext / constructor.C
bloba7995bbfe792f2939f01a0781af0d46ed781ef11
1 // { dg-do run  }
2 // { dg-options "" }
3 // Testcase for constructor expressions (GNU extension)
5 struct Any {
6     int *type;
7     int *addr;
8 };
10 int i, j;
12 main () {
13   struct Any *ap = (struct Any *)
14     __builtin_alloca (sizeof(struct Any));
15   *ap = ((struct Any){ &i, &j }) ;
17   if (ap->type != &i || ap->addr != &j)
18     return 1;
19   return 0;