http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53086
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #4 from kargl at gcc dot gnu.org 2012-04-23 16:09:46 UTC --- (In reply to comment #3) > If it is valid to have such "trailing array" in a COMMON then we need to fix > array sizes for them (that's possible). > > Is this valid fortran? If so this is a Frontend bug as well - -fbounds-check > triggers after all. >From F2003 standard one finds on page 99: The form variable-name (explicit-shape-spec-list) declares variable-name to have the DIMENSION attribute and specifies the array properties that apply. My interpretation is that COMMON /FMCOM / X(1) declares X to have 1 element while PARAMETER (MEMSIZ= 80 000 000) COMMON /FMCOM / X(MEMSIZ) has 80000000 elements. The above appears to be a common F77 idiom for "dynamic" memory management where the programmer is abusing the storage association of element x(1).