[forwarded from http://bugs.debian.org/280972]
gcc version 4.0.0 20041127 (experimental) % gcc div.c && ./a.out 1 2 4 8 5 10 20 40 25 50 100 200 125 250 500 1000 % gcc -O1 div.c && ./a.out zsh: segmentation fault (core dumped) ./a.out The original reporter says he gets bogus output instead of a segfault. This doesn't happen with gcc 3.3 or 3.4. Neither -fno-strict-aliasing nor -fno-ivopts helps. -- Summary: [4.0 regression] loop miscompilation at -O1 Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: falk at debian dot org CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: alphaev68-unknown-linux-gnu GCC host triplet: alphaev68-unknown-linux-gnu GCC target triplet: alphaev68-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18694