This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55117] Programs fails to read namelist (contains derived types objects)
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Oct 2012 16:03:22 +0000
- Subject: [Bug fortran/55117] Programs fails to read namelist (contains derived types objects)
- Auto-submitted: auto-generated
- References: <bug-55117-4@http.gcc.gnu.org/bugzilla/>
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.