1 /* 2 bug-2825.c a bug in s08 code generation that overwrote a in left shifts of 32-bit values by literals in the range [3,7]; 3 */ 4 5 #include <testfwk.h> 6 7 unsigned char c; 8 unsigned long l; 9 f(void)10void f(void) 11 { 12 unsigned char t = c + 1; // t allocated to a 13 14 l <<= 6; // Overwrites a. 15 16 if(t != 1) 17 f(); 18 } 19 testBug(void)20void testBug(void) 21 { 22 c = 0; 23 l = 1; 24 f(); 25 26 ASSERT(l == 1ul << 6); 27 } 28 29