struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-920520-1.c
blob27d794ce354ac5b4f4acf2453fe48f1fe011a3f4
1 /*
2 920520-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 void
12 foo(int *bar)
14 *bar = 8;
17 int
18 bugger(void)
20 int oldDepth, newDepth;
22 foo(&oldDepth);
24 switch (oldDepth)
26 case 8:
27 case 500:
28 newDepth = 8;
29 break;
31 case 5000:
32 newDepth = 500;
33 break;
35 default:
36 newDepth = 17;
37 break;
40 return newDepth - oldDepth;
43 void
44 testTortureExecute (void)
46 ASSERT((bugger() == 0));
47 return;