[Bug libfortran/39668] Wrongly read namelist with two dimensional array.
--- Comment #7 from toon at moene dot org 2009-08-18 16:40 --- The relevant wording in the Standard (2003) is: 9.5.3.4 Data transfer ... The list items for a namelist input statement are processed in the order of the entities specified within the input records. ... To spell it out for this example: 1 is assigned to i(1,1) 2 is assigned to i(2,1) ! Array element order, as no other order is specified. 3 is assigned to i(3,1) ! Ditto. 4 is assigned to i(2,1) ! Overwriting the 2 that was there. 5 is assigned to i(3,1) ! Overwriting the 3 that was there. 6 is assigned to i(2,2) ! Got that ? 7 is assigned to i(3,1) ! Overwriting the 5 that was there. 8 is assigned to i(3,2) ! Hah ! 9 is assigned to i(3,3) ! So there ! i(1,2), i(1,3) and i(2,3) are never set via the namelist I/O and remain at 0. So printing the namelist will get you: 1, 4, 7, 0 (=i(1,2)), 6, 8, 0 (=i(1,3)), 0 (=i(2,3)), 9 which seems perfectly OK with me. Closing the bug report as INVALID, i.e., not a bug. -- toon at moene dot org changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39668
[Bug libfortran/39668] Wrongly read namelist with two dimensional array.
--- Comment #6 from jvdelisle at gcc dot gnu dot org 2009-08-15 02:06 --- Toon, any word on this? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39668
[Bug libfortran/39668] Wrongly read namelist with two dimensional array.
--- Comment #5 from toon at moene dot org 2009-05-05 13:33 --- Hmm, I said I'd put it in waiting until I found the definite wording in the Standard about this use of namelist values ... -- toon at moene dot org changed: What|Removed |Added Status|NEW |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39668
[Bug libfortran/39668] Wrongly read namelist with two dimensional array.
--- Comment #4 from jvdelisle at gcc dot gnu dot org 2009-04-11 16:28 --- Un-assigning, I don't think this is a bug, yet. :) -- jvdelisle at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|jvdelisle at gcc dot gnu dot|unassigned at gcc dot gnu |org |dot org Status|WAITING |NEW http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39668
[Bug libfortran/39668] Wrongly read namelist with two dimensional array.
--- Comment #3 from toon at moene dot org 2009-04-07 18:41 --- Note that the namelist is overwriting earlier assignments, so it's doubtful it's legal Fortran. The original that got my colleague questioning gfortran was: namtest i(1,:)=1,2,3, i(2,:)=4,5,6, i(3,:)=7,8,9, / which, using gfortran version 4.3.3, gave the same (but for this example wrong) results as the namelist submitted in this bug report. gfortran 4.[45] does *this* one right. So it might be a red herring - put bug report in waiting until I figured out the exact language in the Standard that either allows or disallows the original namelist. -- toon at moene dot org changed: What|Removed |Added Status|ASSIGNED|WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39668
[Bug libfortran/39668] Wrongly read namelist with two dimensional array.
--- Comment #1 from jvdelisle at gcc dot gnu dot org 2009-04-07 02:59 --- I see the problem in 4.3, 4.4, and 4.5. I don't have a 4.2 around, can someone check that to see if this is a regression. -- 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|-00-00 00:00:00 |2009-04-07 02:59:59 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39668
[Bug libfortran/39668] Wrongly read namelist with two dimensional array.
--- Comment #2 from burnus at gcc dot gnu dot org 2009-04-07 04:35 --- (In reply to comment #1) I see the problem in 4.3, 4.4, and 4.5. I don't have a 4.2 around, can someone check that to see if this is a regression. 4.1/4.2 show the same result. openf95, g95, ifort, sunf95 all have the following (which differs from Toon's expected result): NAMTEST I = 1, 4, 7, 8, 9, 4*0 / NAG f95 needs an extra open(10) and prints then: Invalid character '2' in NAMELIST input I'm not sure whether the example is valid. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39668