gcc version 4.3.0 20061023 (experimental) Mandriva 2006.0 The program program gfbread character(len=256), dimension(3) :: block_data = (/'1 2 3','4 5 6','7 8 9'/) real(kind=8), dimension(3,3) :: tmp_box read(block_data,*,iostat=iostat)((tmp_box(i,j),j=1,3),i=1,3) write(*,'(3F10.5)') ((tmp_box(i,j),j=1,3),i=1,3) end program gfbread prints the output 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 0.00000 instead of the correct 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000
program gfbread character(len=256), dimension(3) :: block_data = (/' 1 2 3',' 4 5 6',' 7 8 9'/) real(kind=8), dimension(3,3) :: tmp_box read(block_data,'(3(3f2.0/))',iostat=iostat)((tmp_box(i,j),j=1,3),i=1,3) write(*,'(3F10.5)') ((tmp_box(i,j),j=1,3),i=1,3) end program gfbread works fine - the only difference in the code is the io call, so I would guess that something is awry with list_read.c Any ideas, Jerry? Paul
I will have to investigate. If you initialize the array tmpbox to something other than 0 you will see that the list read is not reading the 9th value at all.
I have isolated the problem in list_read.c and am working on a patch. It will be a day or two.
Subject: Bug 29563 Author: jvdelisle Date: Thu Oct 26 04:35:45 2006 New Revision: 118059 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118059 Log: 2006-10-25 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * io/io.h (st_parameter_dt): Add new flag at_eof. * io/list_read.c (next_char): Set flag when EOF and return '\n' to signal EOR. Check flag on next call and jump out. * io/unit.c (get_internal_unit): Initialize new flag. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/io.h trunk/libgfortran/io/list_read.c trunk/libgfortran/io/unit.c
Subject: Bug 29563 Author: jvdelisle Date: Thu Oct 26 04:41:55 2006 New Revision: 118060 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118060 Log: 2006-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * gfortran.dg/arrayio_9.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/arrayio_9.f90 Modified: trunk/gcc/testsuite/ChangeLog
Subject: Bug 29563 Author: jvdelisle Date: Thu Oct 26 07:17:21 2006 New Revision: 118063 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118063 Log: 2006-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * io/list_read.c (next_char): Fix an error in previous commit. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/list_read.c
Subject: Bug 29563 Author: jvdelisle Date: Thu Oct 26 07:19:49 2006 New Revision: 118064 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118064 Log: 2006-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * gfortran.dg/arrayio_9.f90: Update test. * gfortran.dg/arrayio_19.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/arrayio_10.f90 Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/arrayio_9.f90
Subject: Bug 29563 Author: jvdelisle Date: Fri Oct 27 01:04:02 2006 New Revision: 118079 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118079 Log: 2006-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * io/io.h (st_parameter_dt): Add new flag at_eof. * io/list_read.c (next_char): Set flag when EOF and return '\n' to signal EOR. Check flag on next call and jump out. * io/unit.c (get_internal_unit): Initialize new flag. Modified: branches/gcc-4_2-branch/libgfortran/ChangeLog branches/gcc-4_2-branch/libgfortran/io/io.h branches/gcc-4_2-branch/libgfortran/io/list_read.c branches/gcc-4_2-branch/libgfortran/io/unit.c
Subject: Bug 29563 Author: jvdelisle Date: Fri Oct 27 02:03:34 2006 New Revision: 118080 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118080 Log: 2006-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * gfortran.dg/arrayio_9.f90: New test. * gfortran.dg/arrayio_19.f90: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/arrayio_10.f90 branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/arrayio_9.f90 Modified: branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
Fixed on 4.2 and 4.3
Subject: Bug 29563 Author: jvdelisle Date: Fri Oct 27 20:50:15 2006 New Revision: 118085 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118085 Log: 2006-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * gfortran.dg/error_recovery_2.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/error_recovery_2.f90 Modified: trunk/gcc/testsuite/ChangeLog
Ignore comment 11. Had the wrong PR number in ChangeLog entry when committing.
Subject: Bug 29563 Author: jvdelisle Date: Fri Oct 27 21:40:54 2006 New Revision: 118087 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118087 Log: 2006-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * io/io.h (st_parameter_dt): Add new flag at_eof. * io/list_read.c (next_char): Set flag when EOF and return '\n' to signal EOR. Check flag on next call and jump out. * io/unit.c (get_internal_unit): Initialize new flag. Modified: branches/gcc-4_1-branch/libgfortran/ChangeLog branches/gcc-4_1-branch/libgfortran/io/io.h branches/gcc-4_1-branch/libgfortran/io/list_read.c branches/gcc-4_1-branch/libgfortran/io/unit.c
Subject: Bug 29563 Author: jvdelisle Date: Fri Oct 27 21:42:40 2006 New Revision: 118088 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118088 Log: 2006-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/29563 * gfortran.dg/arrayio_9.f90: New test. * gfortran.dg/arrayio_19.f90: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/arrayio_10.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/arrayio_9.f90 Modified: branches/gcc-4_1-branch/gcc/testsuite/ChangeLog