This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/66141] Invalid code generation with -O1, -O2, -O3 for x86_64 target for array reference in Fortran COMMON


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66141

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> [Program generates warning on compilation, but this is allowed under
> the semantics of Fortran COMMON (allocated COMMON storage is longest
> among any of its definition).]

Nope! see the second item below:

5.7.2.5 Dierences between named common and blank common

1 A blank common block has the same properties as a named common block,
  except for the following.

 Execution of a RETURN or END statement might cause data objects in a named
 common block to become undefined unless the common block has the SAVE
attribute,
 but never causes data objects in blank common to become undefined (16.6.6).

 Named common blocks of the same name shall be of the same size in all scoping
 units of a program in which they appear, but blank common blocks may be of
 different sizes.

 A data object in a named common block may be initially defined by means of
 a DATA statement or type declaration statement in a block data program unit
 (11.3), but objects in blank common shall not be initially defined.

*** This bug has been marked as a duplicate of bug 53086 ***


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]