gcc/testsuite/g++.old-deja/g++.law/init14.C
raw| 1 | // { dg-do run } |
| 2 | // GROUPS passed initialization |
| 3 | // init file |
| 4 | // From: [email protected] |
| 5 | // Message-Id: <[email protected]> |
| 6 | // Subject: g++ Bug |
| 7 | // Date: Mon, 13 Dec 93 18:27:51 +0900 |
| 8 | |
| 9 | #include <stdio.h> |
| 10 | |
| 11 | int X = 7; |
| 12 | |
| 13 | struct foo { |
| 14 | int a,b,c; |
| 15 | }; |
| 16 | |
| 17 | struct foo Ack = {5, X, 3}; |
| 18 | |
| 19 | int main() |
| 20 | { |
| 21 | if (Ack.a != 5 |
| 22 | || Ack.b != 7 |
| 23 | || Ack.c != 3) |
| 24 | { printf ("FAIL\n"); return 1; } |
| 25 | else |
| 26 | printf ("PASS\n"); |
| 27 | } |