1 /* 2 20090814-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 int bar(int * a)12bar (int *a) 13 { 14 return *a; 15 } 16 int i; 17 int foo(int (* a)[2])18foo (int (*a)[2]) 19 { 20 return bar (&(*a)[i]); 21 } 22 23 int a[2]; 24 void testTortureExecute(void)25testTortureExecute (void) 26 { 27 a[0] = -1; 28 a[1] = 42; 29 i = 1; 30 if (foo (&a) != 42) 31 ASSERT (0); 32 return; 33 } 34 35