[Bug fortran/86065] gfortran NAMELIST improperly reads arrays that span more than one line.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86065 --- Comment #4 from Charlie --- Thank you. I ran "MinGW Installation Manager" and it installed gfortran v 6.3.0-1 That version appears to work fine for my namelist array problem. I'm not sure how to upgrade beyond 6.3.0-1 to the versions mentioned in the "known to work" section (6.4.1, 7.3.1, 8.1.1, 9.0) but my immediate problem is certainly fixed. Thanks Again, Charlie -Original Message- From: kargl at gcc dot gnu.org [mailto:gcc-bugzi...@gcc.gnu.org] Sent: Wednesday, June 6, 2018 10:52 AM To: char...@sallyandcharlie.com Subject: [Bug fortran/86065] gfortran NAMELIST improperly reads arrays that span more than one line. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86065 kargl at gcc dot gnu.org changed: What|Removed |Added Status|WAITING |RESOLVED Known to work||6.4.1, 7.3.1, 8.1.1, 9.0 Resolution|--- |WORKSFORME --- Comment #3 from kargl at gcc dot gnu.org --- Resolving as WORKSFORME. Thanks for the bug report. I do encourage you to upgrade to a newer version of gfortran if you can.
[Bug fortran/86065] gfortran NAMELIST improperly reads arrays that span more than one line.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86065 --- Comment #2 from Charlie --- Thank You -Original Message- From: kargl at gcc dot gnu.org [mailto:gcc-bugzi...@gcc.gnu.org] Sent: Tuesday, June 5, 2018 7:26 PM To: char...@sallyandcharlie.com Subject: [Bug fortran/86065] gfortran NAMELIST improperly reads arrays that span more than one line. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86065 kargl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 Status|UNCONFIRMED |WAITING Last reconfirmed||2018-06-06 CC||kargl at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from kargl at gcc dot gnu.org --- It appears that you need to update to a newer version of gfortran. The code gives the expected with 6.4.1, 7.3.1, 8.1.1, and 9.0.0. The 5-branch is closed to changes, so it will not be fixed in that branch.
[Bug fortran/86065] New: gfortran NAMELIST improperly reads arrays that span more than one line.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86065 Bug ID: 86065 Summary: gfortran NAMELIST improperly reads arrays that span more than one line. Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: charlie at sallyandcharlie dot com Target Milestone: --- gfortran NAMELIST improperly reads arrays that span more than one line. It skips an array position for lines ending with ",\n" - Example Input File - $MY_INP i = 1,2,3,4, 5,6,7,8, 9,10,11,12, $END -- Example Output from Code Below -- Output: 1 2 3 4 0 5 6 7 8 0 9 10 11 12 0 0 0 0 0 0 ^ ^ Skips an array entry with each new line -- Example Code --- compiled with: gfortran read_arr.f -finit-local-zero -o read_arr.exe -File: read_arr.f-- program NL_ERR dimension i(20) namelist /MY_INP/i open(5,file='a.inp', status='OLD') read(5, MY_INP, end=9) 9 write(*, '(10I2, 10I3)')(i(j), j=1,20) stop end -- Working Input File If the trailing commas are removed, it works properly --- $MY_INP i = 1,2,3,4 5,6,7,8 9,10,11,12, $END Output: 1 2 3 4 5 6 7 8 910 11 12 0 0 0 0 0 0 0 0