http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53086
--- Comment #13 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2012-04-25 13:32:26 UTC --- On Wed, Apr 25, 2012 at 06:46:03AM +0000, burnus at gcc dot gnu.org wrote: > > Thus, the -fcheck=bounds error seems to be appropriate. The question is what > we > do about x(2). While it is invalid, it seems to be used. As the Fortran FE > knows that the last item in a given common block is an array element, it could > change the middle-end decl to "[1:]". This is probably a candidate for -std=legacy. > > (I have not yet checked the exact wording in the Fortran 66 to 2008 > standards.) > I've already quoted the F77 and F03 text. Here's F66: The size of a common block in a program unit is the sum of the storage required for the the elements introduced through COMMON and EQUIVALENCE statements. The sizes of labeled common blocks with the same label in the program units that comprise an executable program must be the same. The sizes of blank common in the various program units that are to be executed together need not be the same. Size is measured in terms of storage units (7.2.1.3.1). The code is invalid. Someone with access to SPEC 200humble should complain loudly about invalid code in their benchmark.