struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20011109-1.c
blob89e43272cadc5980345bcb5210900e41fb581987
1 /*
2 20011109-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 void fail1(void)
13 ASSERT (0);
15 void fail2(void)
17 ASSERT (0);
19 void fail3(void)
21 ASSERT (0);
23 void fail4(void)
25 ASSERT (0);
29 void foo(long x)
31 switch (x)
33 case -6:
34 fail1 (); break;
35 case 0:
36 fail2 (); break;
37 case 1: case 2:
38 break;
39 case 3: case 4: case 5:
40 fail3 ();
41 break;
42 default:
43 fail4 ();
44 break;
46 switch (x)
49 case -3:
50 fail1 (); break;
51 case 0: case 4:
52 fail2 (); break;
53 case 1: case 3:
54 break;
55 case 2: case 8:
56 ASSERT (0);
57 break;
58 default:
59 fail4 ();
60 break;
64 void
65 testTortureExecute (void)
67 foo (1);
68 return;