struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20011223-1.c
blob3f3d21f1d30c15fe1f2028b40c67add2e18e8792
1 /*
2 20011223-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 /* Origin: Joseph Myers <jsm28@cam.ac.uk>. */
12 /* Case labels in a switch statement are converted to the promoted
13 type of the controlling expression, not an unpromoted version.
14 Reported as PR c/2454 by
15 Andreas Krakowczyk <Andreas.Krakowczyk@fujitsu-siemens.com>. */
17 static int i;
19 void
20 testTortureExecute (void)
22 i = -1;
23 switch ((signed char) i) {
24 case 255:
25 ASSERT (0);
26 default:
27 return;