The program below on gcc 4.1.2 prints: > gcc4 test.c > ./a.out got 0 x y done ---------------------------------- The program below on gcc 3.4.4 prints: > gcc test.c > ./a.out got 0 x y and then locks up... ---------------------------------- #include <stdio.h> int main() { unsigned int var102 = 1; int a = ( var102 >> 0x1eU & sizeof 290 ); printf("got %d\n", a); fflush(stdout); for ( ; 0; ) {} printf("x\n"); fflush(stdout); for ( ; a; ) {} printf("y\n"); fflush(stdout); for ( ; ( var102 >> 0x1eU & sizeof 290 ); ) // Fails here {} printf("done\n"); return 0; }
Created attachment 15760 [details] test.i
Fixed in 4.1.0