1 /* 2 20070212-1.c from the execute part of the gcc torture suite. 3 */ 4 5 #include <testfwk.h> 6 7 #ifdef __SDCC 8 #pragma std_c99 9 #endif 10 11 struct f 12 { 13 int i; 14 }; 15 g(int i,int c,struct f * ff,int * p)16int g(int i, int c, struct f *ff, int *p) 17 { 18 int *t; 19 if (c) 20 t = &i; 21 else 22 t = &ff->i; 23 *p = 0; 24 return *t; 25 } 26 27 void testTortureExecute(void)28testTortureExecute (void) 29 { 30 struct f f; 31 f.i = 1; 32 if (g(5, 0, &f, &f.i) != 0) 33 ASSERT (0); 34 return; 35 } 36