1 /* 2 20050131-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 /* Verify that we do not lose side effects on a MOD expression. */ 12 13 #include <stdlib.h> 14 #include <stdio.h> 15 16 int foo(int a)17foo (int a) 18 { 19 int x = 0 % a++; 20 return a; 21 } 22 23 void testTortureExecute(void)24testTortureExecute (void) 25 { 26 if (foo (9) != 10) 27 ASSERT (0); 28 return; 29 } 30