http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54767
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-10-01 Known to work| |4.4.6, 4.5.3, 4.6.3 Summary|Incorrect code generated |[4.7/4.8 Regression] |with "-O2 -fcheck=bounds" |Incorrect code generated | |with "-O2 -fcheck=bounds" Ever Confirmed|0 |1 Known to fail| |4.7.1, 4.7.2, 4.8.0 --- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-01 17:45:19 UTC --- This seems to be a 4.7/4.8 regression. Compiling the test with ' -Wall -Wextra -Wuninitialized -O3 -fbounds-check' gives the expected results for 4.4.6, 4.5.3, and 4.6.3, but not for 4.7.2 or trunk. Revision 176696 (2011-07-23) is OK, but not revision 177649 (2011-08-11). If I initialize iaii as iaii=huge(0), I get the expected result. Note to be pedantic, the use of INTENT in the subroutine requires an interface (but it does not change anything either to add the interface or to remove the intent).