1 /* 2 20010106-1.c from the execute part of the gcc torture tests. 3 */ 4 5 #include <testfwk.h> 6 7 #ifdef __SDCC 8 #pragma std_c99 9 #endif 10 11 /* Copyright 2001 Free Software Foundation 12 Contributed by Alexandre Oliva <aoliva@redhat.com> */ 13 f(int i)14int f(int i) { 15 switch (i) 16 { 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); 33 } 34 } 35 36 void testTortureExecute(void)37testTortureExecute (void) { 38 if (f(-1)) 39 ASSERT (0); 40 return; 41 } 42 43