https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69368
--- Comment #29 from Wilco <wdijkstr at arm dot com> --- (In reply to rguent...@suse.de from comment #28) > On Fri, 5 Feb 2016, alalaw01 at gcc dot gnu.org wrote: > > Should I raise a new bug for this, as both this and 53068 are CLOSED? > > I think this has been discussed in some other dup already and > the Fortran FE folks disagreed (it was never "legal", not even in F77). > > I also don't see how it can be a FE only fix. Possibly we can > implemnet a middle-end switch that tells us that the size of commons > is not to be trusted. The FE could then set that flag with -std=legacy. > > You can, after all, "simulate" the very same failure with C. Isn't there already a special exception for C (array of size 1 at end of structure)? The same exception could be enabled with -std=legacy. You'd only need to do extra FE work if you wanted to just do this for COMMON, but that seems hardly worth the extra effort - how much gain do we really get from the array size 1 optimization apart from repeatedly breaking SPEC benchmarks in various ways? Disabling it will likely remove the need for -fno-aggressive-loop-optimizations as well.