First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 13278
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Steven Bosscher <steven@gcc.gnu.org>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 13278 depends on: Show dependency tree
Show dependency graph
Bug 13278 blocks: 15502

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2004-04-26 04:03 Opened: 2003-12-03 08:48
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.

------- Comment #1 From Andrew Pinski 2003-12-05 23:15 -------
Confirmed.

------- Comment #2 From Andrew Pinski 2004-01-20 15:17 -------
*** Bug 13771 has been marked as a duplicate of this bug. ***

------- Comment #3 From Tobias Schlüter 2004-06-02 13:55 -------
Added 'namelist' to the summary.

------- Comment #4 From Andrew Pinski 2004-08-16 18:42 -------
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>.

------- Comment #5 From CVS Commits 2004-08-18 01:20 -------
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


------- Comment #6 From Andrew Pinski 2004-08-18 02:22 -------
Fixed.

First Last Prev Next    No search results available      Search page      Enter new bug