This causes an ICE: --------------------------- module foo type coords real :: x,y,z end type coords type (coords) point end module foo program bar use foo namelist /nml/ point read (5,nml=nml) end program bar --------------------------- t.f90: In function `MAIN__': t.f90:11: internal compiler error: Bad namelist IO basetype (7) Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Confirmed.
*** Bug 13771 has been marked as a duplicate of this bug. ***
Added 'namelist' to the summary.
Just to make a note that this is what causes galgel to fail to build. And here is the patch <http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00993.html>.
Subject: Bug 13278 CVSROOT: /cvs/gcc Module name: gcc Changes by: pbrook@gcc.gnu.org 2004-08-18 01:20:06 Modified files: gcc/fortran : ChangeLog trans-io.c libgfortran : ChangeLog libgfortran/io : io.h transfer.c write.c Log message: 2004-08-18 Victor Leikehman <lei@il.ibm.com> PR fortran/13278 * trans-io.c (transfer_namelist_element): New. Recursively handle derived-type variables. Pass string lengths. (build_dt): Code moved to build_namelist, with some changes and additions. (gfc_build_io_library_fndecls): Declare the fifth argument in st_set_nml_var_char -- string_length. libgfortran/ * io/transfer.c (st_set_nml_var) * io/write.c (namelist_write): Allow var_name and var_name_len to be null. For strings, use string_length field instead of len. * io/io.h (struct namelist_type): New field string_length. (st_set_nml_var_char): New argument string_length. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.152&r2=1.153 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-io.c.diff?cvsroot=gcc&r1=1.10&r2=1.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.61&r2=1.62 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/io.h.diff?cvsroot=gcc&r1=1.6&r2=1.7 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&r1=1.8&r2=1.9 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/write.c.diff?cvsroot=gcc&r1=1.9&r2=1.10
Fixed.