https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69360
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2016-01-19 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- The code is indeed invalid on two counts. The first one is named commons of different sizes (related to/duplicate of pr44882). The second is out of bound access: the array 'e' is defined with only one element, accessing e(2) is invalid (caught if the code is compiled with -fcheck=bounds). Thus the compiler can do whatever it wants, e.g., considers that the loop is run only once. This should be disabled by the option no-aggressive-loop-optimizations, but it is not.