public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/42901] New: reading array of structures from namelist fails
@ 2010-01-29 21:41 arnold dot moene at wur dot nl
2010-01-29 22:27 ` [Bug fortran/42901] " jvdelisle at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: arnold dot moene at wur dot nl @ 2010-01-29 21:41 UTC (permalink / raw)
To: gcc-bugs
Reading a namelist that contains a variable that is an array of structures
fails. Whatever the index of the array element, the values that are read are
assigned to the first array element.
Below a more or less minimal example:
------------
PROGRAM test_nml
! Start declarations
! Struct with one member
TYPE FIELD_DESCR
INTEGER NUMBER ! number
END TYPE
! Array of structs
TYPE FSETUP
TYPE (FIELD_DESCR), DIMENSION(3) :: VEL ! 3 velocity components
END TYPE
!Actual variable
TYPE (FSETUP) FIELD_SETUP
!Namelist
NAMELIST /NL_SETUP/ FIELD_SETUP
! End of declarations
! Reading succeeds, but only fills struct of first array element
READ(*,NML=NL_SETUP)
! Show failure
WRITE(*,NML=NL_SETUP)
END PROGRAM test_nml
------------
If fed with the following namelist:
------------
&NL_SETUP
FIELD_SETUP%VEL(1)%NUMBER= 3,
FIELD_SETUP%VEL(2)%NUMBER= 9,
FIELD_SETUP%VEL(3)%NUMBER= 27,
/
------------
The resulting output is:
------------
&NL_SETUP
FIELD_SETUP%VEL(1)%NUMBER= 27,
FIELD_SETUP%VEL(2)%NUMBER= 0,
FIELD_SETUP%VEL(3)%NUMBER=-1209668170, /
------------
At least ifort knows how to deal with this correctly.
--
Summary: reading array of structures from namelist fails
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: arnold dot moene at wur dot nl
GCC host triplet: Linux localhost 2.6.27.19-desktop586-1mnb
GCC target triplet: i586-manbo-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/42901] reading array of structures from namelist fails
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
@ 2010-01-29 22:27 ` jvdelisle at gcc dot gnu dot org
2010-01-29 22:56 ` [Bug fortran/42901] [4.3/4.4/4.5 Regression] " burnus at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-01-29 22:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jvdelisle at gcc dot gnu dot org 2010-01-29 22:27 -------
I will have a look at this one.
--
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|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-01-29 22:27:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/42901] [4.3/4.4/4.5 Regression] reading array of structures from namelist fails
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
2010-01-29 22:27 ` [Bug fortran/42901] " jvdelisle at gcc dot gnu dot org
@ 2010-01-29 22:56 ` burnus at gcc dot gnu dot org
2010-02-03 4:21 ` jvdelisle at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-01-29 22:56 UTC (permalink / raw)
To: gcc-bugs
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Known to fail| |4.4.2 4.3.4 4.5.0
Known to work| |4.2.1 4.1.2
Priority|P3 |P4
Summary|reading array of structures |[4.3/4.4/4.5 Regression]
|from namelist fails |reading array of structures
| |from namelist fails
Target Milestone|--- |4.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/42901] [4.3/4.4/4.5 Regression] reading array of structures from namelist fails
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
2010-01-29 22:27 ` [Bug fortran/42901] " jvdelisle at gcc dot gnu dot org
2010-01-29 22:56 ` [Bug fortran/42901] [4.3/4.4/4.5 Regression] " burnus at gcc dot gnu dot org
@ 2010-02-03 4:21 ` jvdelisle at gcc dot gnu dot org
2010-02-04 1:50 ` jvdelisle at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-02-03 4:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2010-02-03 04:20 -------
Patch submitted for approval:
http://gcc.gnu.org/ml/fortran/2010-02/msg00017.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/42901] [4.3/4.4/4.5 Regression] reading array of structures from namelist fails
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
` (2 preceding siblings ...)
2010-02-03 4:21 ` jvdelisle at gcc dot gnu dot org
@ 2010-02-04 1:50 ` jvdelisle at gcc dot gnu dot org
2010-02-04 1:54 ` jvdelisle at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-02-04 1:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2010-02-04 01:50 -------
Subject: Bug 42901
Author: jvdelisle
Date: Thu Feb 4 01:49:41 2010
New Revision: 156487
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156487
Log:
2010-02-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/42901
* io/list_read.c (nml_get_obj_data): Add new qualifier flag, clean up
code, and adjust logic to set namelist info pointer correctly for array
qualifiers of derived type components.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/list_read.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/42901] [4.3/4.4/4.5 Regression] reading array of structures from namelist fails
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
` (3 preceding siblings ...)
2010-02-04 1:50 ` jvdelisle at gcc dot gnu dot org
@ 2010-02-04 1:54 ` jvdelisle at gcc dot gnu dot org
2010-02-05 4:47 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-02-04 1:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2010-02-04 01:53 -------
Subject: Bug 42901
Author: jvdelisle
Date: Thu Feb 4 01:53:37 2010
New Revision: 156488
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156488
Log:
2010-02-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/42901
* gfortran.dg/namelist_60.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/namelist_60.f90
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/42901] [4.3/4.4/4.5 Regression] reading array of structures from namelist fails
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
` (4 preceding siblings ...)
2010-02-04 1:54 ` jvdelisle at gcc dot gnu dot org
@ 2010-02-05 4:47 ` jvdelisle at gcc dot gnu dot org
2010-02-05 4:51 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-02-05 4:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2010-02-05 04:47 -------
Subject: Bug 42901
Author: jvdelisle
Date: Fri Feb 5 04:47:12 2010
New Revision: 156507
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156507
Log:
2010-02-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/42901
* io/list_read.c (nml_get_obj_data): Add new qualifier flag, clean up
code, and adjust logic to set namelist info pointer correctly for array
qualifiers of derived type components.
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=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/42901] [4.3/4.4/4.5 Regression] reading array of structures from namelist fails
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
` (5 preceding siblings ...)
2010-02-05 4:47 ` jvdelisle at gcc dot gnu dot org
@ 2010-02-05 4:51 ` jvdelisle at gcc dot gnu dot org
2010-02-05 4:59 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-02-05 4:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2010-02-05 04:51 -------
Subject: Bug 42901
Author: jvdelisle
Date: Fri Feb 5 04:50:53 2010
New Revision: 156508
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156508
Log:
2010-02-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/42901
*gfortran.dg/namelist_60.f90: New test.
*gfortran.dg/namelist_59.f90: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/namelist_59.f90
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/namelist_60.f90
Modified:
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/42901] [4.3/4.4/4.5 Regression] reading array of structures from namelist fails
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
` (6 preceding siblings ...)
2010-02-05 4:51 ` jvdelisle at gcc dot gnu dot org
@ 2010-02-05 4:59 ` jvdelisle at gcc dot gnu dot org
2010-02-05 5:00 ` jvdelisle at gcc dot gnu dot org
2010-02-05 20:06 ` jvdelisle at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-02-05 4:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jvdelisle at gcc dot gnu dot org 2010-02-05 04:58 -------
Subject: Bug 42901
Author: jvdelisle
Date: Fri Feb 5 04:58:30 2010
New Revision: 156509
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156509
Log:
2010-02-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/42901
* io/list_read.c (nml_get_obj_data): Add new qualifier flag, clean up
code, and adjust logic to set namelist info pointer correctly for array
qualifiers of derived type components.
Modified:
branches/gcc-4_3-branch/libgfortran/ChangeLog
branches/gcc-4_3-branch/libgfortran/io/list_read.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/42901] [4.3/4.4/4.5 Regression] reading array of structures from namelist fails
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
` (7 preceding siblings ...)
2010-02-05 4:59 ` jvdelisle at gcc dot gnu dot org
@ 2010-02-05 5:00 ` jvdelisle at gcc dot gnu dot org
2010-02-05 20:06 ` jvdelisle at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-02-05 5:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2010-02-05 05:00 -------
Subject: Bug 42901
Author: jvdelisle
Date: Fri Feb 5 05:00:15 2010
New Revision: 156510
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156510
Log:
2010-02-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/42901
* gfortran.dg/namelist_60.f90: New test.
* gfortran.dg/namelist_59.f90: New test.
* gcc/testsuite/gfortran.dg/namelist_47.f90: Update test.
* gcc/testsuite/gfortran.dg/namelist_40.f90: Update test.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/namelist_59.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/namelist_60.f90
Modified:
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/namelist_40.f90
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/namelist_47.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/42901] [4.3/4.4/4.5 Regression] reading array of structures from namelist fails
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
` (8 preceding siblings ...)
2010-02-05 5:00 ` jvdelisle at gcc dot gnu dot org
@ 2010-02-05 20:06 ` jvdelisle at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-02-05 20:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2010-02-05 20:06 -------
Fixed.
--
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=42901
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-02-05 20:06 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-29 21:41 [Bug fortran/42901] New: reading array of structures from namelist fails arnold dot moene at wur dot nl
2010-01-29 22:27 ` [Bug fortran/42901] " jvdelisle at gcc dot gnu dot org
2010-01-29 22:56 ` [Bug fortran/42901] [4.3/4.4/4.5 Regression] " burnus at gcc dot gnu dot org
2010-02-03 4:21 ` jvdelisle at gcc dot gnu dot org
2010-02-04 1:50 ` jvdelisle at gcc dot gnu dot org
2010-02-04 1:54 ` jvdelisle at gcc dot gnu dot org
2010-02-05 4:47 ` jvdelisle at gcc dot gnu dot org
2010-02-05 4:51 ` jvdelisle at gcc dot gnu dot org
2010-02-05 4:59 ` jvdelisle at gcc dot gnu dot org
2010-02-05 5:00 ` jvdelisle at gcc dot gnu dot org
2010-02-05 20:06 ` 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).