1 /* 2 981130-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 s { int a; int b;}; 12 struct s s1; 13 struct s s2 = { 1, 2, }; 14 15 void check(int a,int b)16check (int a, int b) 17 { 18 if (a == b) 19 return; 20 else 21 ASSERT (0); 22 } 23 24 void testTortureExecute(void)25testTortureExecute (void) 26 { 27 int * p; 28 int x; 29 30 s1.a = 9; 31 p = & s1.a; 32 s1 = s2; 33 x = * p; 34 35 check (x, 1); 36 } 37 38