1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/* bug3482753.c */ #include <testfwk.h> struct {char a;} x; volatile char d = 7; int f(void) { char t = d; x.a = t; t = x.a + 2; d = t; t = x.a + 3; /* bug: x.a was optimized to t, despite redefinition of t */ return t; } void testBug(void) { ASSERT(f() == 10); }