This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/55117] Programs fails to read namelist (contains derived types objects)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]