struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20030903-1.c
blobcbca8767255e1e02d04fa8e976cd3735fc015805
1 /*
2 20030903-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #pragma disable_warning 85
10 #endif
12 /* Test that we don't let stmt.c think that the enumeration's values are
13 the entire set of possibilities. Such an assumption is false for C,
14 but true for other languages. */
16 enum X { X1 = 1, X2, X3, X4 };
17 static volatile enum X test = 0;
18 static void y(int);
20 void
21 testTortureExecute (void)
23 switch (test)
25 case X1: y(1); break;
26 case X2: y(2); break;
27 case X3: y(3); break;
28 case X4: y(4); break;
30 return;
33 static void y(int x) { ASSERT (0); }