[Bug fortran/55117] Programs fails to read namelist (contains derived types objects)
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 29 16:03:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55117
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
CC| |janus at gcc dot gnu.org
--- Comment #3 from janus at gcc dot gnu.org 2012-10-29 16:03:22 UTC ---
I can confirm that I see the error with 4.3, 4.7 and trunk.
Slightly reduced test case:
***************************
IMPLICIT NONE
TYPE TC
INTEGER :: E
END TYPE
TYPE TB
TYPE(TC) :: C
INTEGER :: D
END TYPE
INTEGER :: A
TYPE(TB) :: B(1:10)
NAMELIST /N/ A, B
OPEN (4,FILE='NAMELIST')
READ (4,NML=N)
END
***************************
&N
A=12,
B(1)%D=4
/
***************************
What's funny is that the error e.g. depends on the presence of the component
'C', although it is not referenced in the namelist at all. Furthermore the
error only occurs if 'A' is also in the namelist.
More information about the Gcc-bugs
mailing list