https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78659
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #8 from janus at gcc dot gnu.org ---
I think this needs to be reopened. As mentioned in comment 0, the original test
case in itself is valid, but is invalidated by adding an I/O statement that
references the namelist, like so:
MODULE ma
IMPLICIT NONE
TYPE :: ta
INTEGER, ALLOCATABLE :: array(:)
END TYPE ta
END MODULE ma
PROGRAM p
USE ma
TYPE(ta) :: x
NAMELIST /nml/ x
WRITE (*, nml)
END PROGRAM p
This case is not rejected after r243308 and runs into an ICE.
With gfortran 6, it is rejected with the old error. Although it is not quite
correct that the error is thrown on the namelist statement instead of the write
statement, the ICE is technically a regression.