struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20010106-1.c
blob553e99881cca4c1e2bc7ce31837e61d14dacced0
1 /*
2 20010106-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 /* Copyright 2001 Free Software Foundation
12 Contributed by Alexandre Oliva <aoliva@redhat.com> */
14 int f(int i) {
15 switch (i)
17 case -2:
18 return 33;
19 case -1:
20 return 0;
21 case 0:
22 return 7;
23 case 1:
24 return 4;
25 case 2:
26 return 3;
27 case 3:
28 return 15;
29 case 4:
30 return 9;
31 default:
32 ASSERT(0);
36 void
37 testTortureExecute (void) {
38 if (f(-1))
39 ASSERT (0);
40 return;