public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40853] New: Namelist read error
@ 2009-07-24 21:02 david dot sagan at gmail dot com
2009-07-24 21:05 ` [Bug fortran/40853] " david dot sagan at gmail dot com
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: david dot sagan at gmail dot com @ 2009-07-24 21:02 UTC (permalink / raw)
To: gcc-bugs
In brief: A namelist read of a structure component that is a vector when that
structure has another component that is a structure results in a runtime error.
Test file:
program test
implicit none
type tao_title_struct
character(2) justify
end type
type tao_plot_page_struct
real shape_height_max
type (tao_title_struct) title ! Comment this line out and the bug goes
away.
real size(2)
end type
type (tao_plot_page_struct) plot_page
namelist / params / plot_page
open (1, file = 'test.in')
read (1, nml = params)
close (1)
end program
The file test.in is:
¶ms
plot_page%size = 1, 2
/
Compiling and running gives:
[atf2code@lnx209 test]$ gfortran -v -save-temps test.f90
Driving: gfortran -v -save-temps test.f90 -lgfortranbegin -lgfortran -lm
-shared-libgcc
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.1/configure --prefix=/home/atf2code/atf2/usr_local
--with-gmp=/home/atf2code/atf2/usr_local
--with-mpfr=/home/atf2code/atf2/usr_local
Thread model: posix
gcc version 4.4.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc' '-mtune=generic'
/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../libexec/gcc/i686-pc-linux-gnu/4.4.1/f951
test.f90 -quiet -dumpbase test.f90 -mtune=generic -auxbase test -version
-fintrinsic-modules-path
/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/finclude
-o test.s
GNU Fortran (GCC) version 4.4.1 (i686-pc-linux-gnu)
compiled by GNU C version 4.4.1, GMP version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc' '-mtune=generic'
as -V -Qy -o test.o test.s
GNU assembler version 2.15.92.0.2 (i386-redhat-linux) using BFD version
2.15.92.0.2 20040927
COMPILER_PATH=/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../libexec/gcc/i686-pc-linux-gnu/4.4.1/:/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../libexec/gcc/
LIBRARY_PATH=/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/:/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../lib/gcc/:/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc' '-mtune=generic'
/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../libexec/gcc/i686-pc-linux-gnu/4.4.1/collect2
--eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o
/usr/lib/crti.o
/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/crtbegin.o
-L/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1
-L/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../lib/gcc
-L/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../..
test.o -lgfortranbegin -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/a/lnx113/nfs/acc/temp/atf2/usr_local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/crtend.o
/usr/lib/crtn.o
[atf2code@lnx209 test]$ ./a.out
At line 20 of file test.f90 (unit = 1, file = 'test.in')
Fortran runtime error: Cannot match namelist object name 1
Note: If the "title" component of tao_plot_page_struct is commented out or
moved below the "size" component then the program runs without fail.
--
Summary: Namelist read error
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: david dot sagan at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
@ 2009-07-24 21:05 ` david dot sagan at gmail dot com
2009-07-27 9:40 ` [Bug fortran/40853] I/O: " burnus at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: david dot sagan at gmail dot com @ 2009-07-24 21:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from david dot sagan at gmail dot com 2009-07-24 21:05 -------
Created an attachment (id=18250)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18250&action=view)
test.s file generated by the compile
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] I/O: Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
2009-07-24 21:05 ` [Bug fortran/40853] " david dot sagan at gmail dot com
@ 2009-07-27 9:40 ` burnus at gcc dot gnu dot org
2009-07-28 2:00 ` jvdelisle at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-27 9:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2009-07-27 09:40 -------
Confirmed. Fails with gfortran 4.1 to 4.5 and is thus no regression, but it
works with ifort, g95, openf95, and NAG f95.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Known to fail| |4.1.3 4.2.1 4.3.3 4.4.1
| |4.5.0
Last reconfirmed|0000-00-00 00:00:00 |2009-07-27 09:40:04
date| |
Summary|Namelist read error |I/O: Namelist read error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] I/O: Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
2009-07-24 21:05 ` [Bug fortran/40853] " david dot sagan at gmail dot com
2009-07-27 9:40 ` [Bug fortran/40853] I/O: " burnus at gcc dot gnu dot org
@ 2009-07-28 2:00 ` jvdelisle at gcc dot gnu dot org
2009-07-28 3:09 ` jvdelisle at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-28 2:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2009-07-28 02:00 -------
I will get started on this.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2009-07-27 09:40:04 |2009-07-28 02:00:12
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] I/O: Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
` (2 preceding siblings ...)
2009-07-28 2:00 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-28 3:09 ` jvdelisle at gcc dot gnu dot org
2009-07-29 4:40 ` jvdelisle at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-28 3:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2009-07-28 03:09 -------
As a work-around, re-arranging the derived type like this:
type tao_plot_page_struct
real size(2)
real shape_height_max
type (tao_title_struct) title
end type
May help, until I get this sorted out.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] I/O: Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
` (3 preceding siblings ...)
2009-07-28 3:09 ` jvdelisle at gcc dot gnu dot org
@ 2009-07-29 4:40 ` jvdelisle at gcc dot gnu dot org
2009-08-01 15:43 ` jvdelisle at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-07-29 4:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2009-07-29 04:40 -------
Created an attachment (id=18265)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18265&action=view)
A simple patch to resolve the problem
This patch solves the original test case. It does require modification of test
suite cases namelist_40.f90 and namelist_47.f90. With the patch, those two
test cases have a slightly modified error output.
Additional testing is always appreciated. I will prepare a submittal for
approval tomorrow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] I/O: Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
` (4 preceding siblings ...)
2009-07-29 4:40 ` jvdelisle at gcc dot gnu dot org
@ 2009-08-01 15:43 ` jvdelisle at gcc dot gnu dot org
2009-08-02 18:31 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-01 15:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2009-08-01 15:42 -------
Patch submitted for approval:
http://gcc.gnu.org/ml/fortran/2009-08/msg00001.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] I/O: Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
` (5 preceding siblings ...)
2009-08-01 15:43 ` jvdelisle at gcc dot gnu dot org
@ 2009-08-02 18:31 ` jvdelisle at gcc dot gnu dot org
2009-08-02 18:48 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-02 18:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jvdelisle at gcc dot gnu dot org 2009-08-02 18:31 -------
Subject: Bug 40853
Author: jvdelisle
Date: Sun Aug 2 18:31:07 2009
New Revision: 150356
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150356
Log:
2009-08-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40853
* io/list_read.c (nml_get_obj_data): Do not set nl
pointer to first_nl if nl->next is NULL.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/list_read.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] I/O: Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
` (6 preceding siblings ...)
2009-08-02 18:31 ` jvdelisle at gcc dot gnu dot org
@ 2009-08-02 18:48 ` jvdelisle at gcc dot gnu dot org
2009-08-05 3:15 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-02 18:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2009-08-02 18:48 -------
Subject: Bug 40853
Author: jvdelisle
Date: Sun Aug 2 18:47:46 2009
New Revision: 150357
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150357
Log:
2009-08-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40853
* gfortran.dg/namelist_40.f90: Update error output.
* gfortran.dg/namelist_47.f90: Update error output.
* gfortran.dg/namelist_58.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/namelist_58.f90
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/namelist_40.f90
trunk/gcc/testsuite/gfortran.dg/namelist_47.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] I/O: Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
` (7 preceding siblings ...)
2009-08-02 18:48 ` jvdelisle at gcc dot gnu dot org
@ 2009-08-05 3:15 ` jvdelisle at gcc dot gnu dot org
2009-08-05 3:18 ` jvdelisle at gcc dot gnu dot org
2009-08-05 3:19 ` jvdelisle at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-05 3:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2009-08-05 03:15 -------
Subject: Bug 40853
Author: jvdelisle
Date: Wed Aug 5 03:15:18 2009
New Revision: 150476
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150476
Log:
2009-08-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40853
* io/list_read.c (nml_get_obj_data): Do not set nl
pointer to first_nl if nl->next is NULL.
Modified:
branches/gcc-4_4-branch/libgfortran/ChangeLog
branches/gcc-4_4-branch/libgfortran/io/list_read.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] I/O: Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
` (8 preceding siblings ...)
2009-08-05 3:15 ` jvdelisle at gcc dot gnu dot org
@ 2009-08-05 3:18 ` jvdelisle at gcc dot gnu dot org
2009-08-05 3:19 ` jvdelisle at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-05 3:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2009-08-05 03:18 -------
Subject: Bug 40853
Author: jvdelisle
Date: Wed Aug 5 03:17:52 2009
New Revision: 150477
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150477
Log:
2009-08-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40853
* gfortran.dg/namelist_40.f90: Update error output.
* gfortran.dg/namelist_47.f90: Update error output.
* gfortran.dg/namelist_58.f90: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/namelist_58.f90
Modified:
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/namelist_40.f90
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/namelist_47.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/40853] I/O: Namelist read error
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
` (9 preceding siblings ...)
2009-08-05 3:18 ` jvdelisle at gcc dot gnu dot org
@ 2009-08-05 3:19 ` jvdelisle at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-05 3:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jvdelisle at gcc dot gnu dot org 2009-08-05 03:19 -------
Fixed on 4.4 and 4.5, closing
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40853
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-08-05 3:19 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-24 21:02 [Bug fortran/40853] New: Namelist read error david dot sagan at gmail dot com
2009-07-24 21:05 ` [Bug fortran/40853] " david dot sagan at gmail dot com
2009-07-27 9:40 ` [Bug fortran/40853] I/O: " burnus at gcc dot gnu dot org
2009-07-28 2:00 ` jvdelisle at gcc dot gnu dot org
2009-07-28 3:09 ` jvdelisle at gcc dot gnu dot org
2009-07-29 4:40 ` jvdelisle at gcc dot gnu dot org
2009-08-01 15:43 ` jvdelisle at gcc dot gnu dot org
2009-08-02 18:31 ` jvdelisle at gcc dot gnu dot org
2009-08-02 18:48 ` jvdelisle at gcc dot gnu dot org
2009-08-05 3:15 ` jvdelisle at gcc dot gnu dot org
2009-08-05 3:18 ` jvdelisle at gcc dot gnu dot org
2009-08-05 3:19 ` jvdelisle at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).