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

            Bug ID: 106065
           Summary: Crash when reading extended derived type array in
                    namelist
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: philippe.wautelet at aero dot obs-mip.fr
  Target Milestone: ---

Created attachment 53195
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53195&action=edit
Reproducer

I get a crash when using an array of extended derived types.
If I define an other type containing the same information but not extended, the
problem disappears.

See the attached source:
> gfortran type_extends_nml.f90 ;./a.out

&NAM_BAL_NE
 DATE_TIME_NE(1)%NYEAR=       2022,
 DATE_TIME_NE(1)%NMONTH=          0,
 DATE_TIME_NE(1)%NDAY=          0,
 DATE_TIME_NE(1)%XTIME=  0.00000000    ,
 DATE_TIME_NE(2)%NYEAR=          0,
 DATE_TIME_NE(2)%NMONTH=          0,
 DATE_TIME_NE(2)%NDAY=          0,
 DATE_TIME_NE(2)%XTIME=  1.23399997    ,
 /
At line 36 of file type_extends_nml.f90
Fortran runtime error: Cannot match namelist object name 2022

I tested with several versions of gfortran from version 5.5.0 to 12.1.0. All
failed.
  • [Bug fortran/106065]... philippe.wautelet at aero dot obs-mip.fr via Gcc-bugs

Reply via email to