1 /* 2 pr642602.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 /* PR rtl-optimization/64260 */ 12 13 int a = 1, b; 14 15 void foo(char p)16foo (char p) 17 { 18 int t = 0; 19 for (; b < 1; b++) 20 { 21 int *s = &a; 22 if (--t) 23 *s &= p; 24 *s &= 1; 25 } 26 } 27 28 void testTortureExecute(void)29testTortureExecute (void) 30 { 31 foo (0); 32 if (a != 0) 33 ASSERT (0); 34 return; 35 } 36