[Bug fortran/108454] ICE in gfc_trans_common, at fortran/trans-common.cc:1385

anlauf at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 18 20:37:01 GMT 2023


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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-01-18
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #1 from anlauf at gcc dot gnu.org ---
The code crashing gfortran may actually be valid.

Consider:

module m
  implicit none
  type t
  end type
contains
  subroutine s
    real :: t
    common /com/ t
  end
end

This is accepted by other compilers, including Intel and NAG.

With -fdump-fortran-original we see that memory gets clobbered somewhere
if the derived-type name is the same as the common variable.


More information about the Gcc-bugs mailing list