http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50463
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011-09-20 CC| |bur...@net-b.de, jh at suse | |dot cz, rguenther at suse | |dot de Summary|-ftree-dse leeds to wrong |[4.6/4.7 Regression] |code with gfortran |-ftree-dse leeds to wrong | |code with gfortran Ever Confirmed|0 |1 Severity|critical |normal --- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-09-20 13:14:08 UTC --- I confirm the problem on 4.6.1 and trunk, but the code seems to work as expected with 4.5.3 and 4.4.6. It also works if I merge the three files in one, or if I use -flto. Assuming that the test is coming from a bigger project, could you try -flto on it?