http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49069
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |nickc at gcc dot gnu.org, | |ramana at gcc dot gnu.org --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-17 15:55:26 UTC --- The issue isn't latent, can be still reproduced with: /* PR target/49069 */ /* { dg-do compile } */ /* { dg-options "-Os -fno-tree-forwprop -Wno-div-by-zero" } */ int a; const unsigned long long b[1] = { 1ULL }; extern void bar (int); void foo (void) { for (a = 0; a == 1; a = 2) ; bar (b[0] == (a == 0 ? a : a / 0)); } Which also shows that the middle-end usually optimizes that well (cf. #c4), but the arm backend relying on that always happening is just a very bad assumption.