This program: program readstrlist character(len=80), dimension(2) :: ver integer :: a, b, c ver(1) = '285 383' ver(2) = '985' read( ver, *) a, b, c write ( *, *) a, b, c end Outputs: At line 8 of file readstrlist.f90 Fortran runtime error: End of file with: Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.0/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.9.0-20140409/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.0-20140409/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.9.0 20140409 (Red Hat 4.9.0-0.9) (GCC) works with 4.8.2 and earlier and ifort version 14.0.2.
Confirmed. Works on 4.6, fails on 4.7, 4.8, and 4.9. I have to think about this a bit. I could see an end-of-record message would be possibly the right behavior since each array element is treated as a record. On the other hand, ifort accepts this. So I wonder what other compilers do.
Is that the r208591 (and for 4.8 r208595) change that changed the behavior?
The libgfortran change is in all of 4.7/4.8 branches and the trunk now I believe.
(In reply to Jakub Jelinek from comment #3) > The libgfortran change is in all of 4.7/4.8 branches and the trunk now I > believe. I am checking now. If so I will probably revert that previous patch.
The breakage is at r208528, investigating.
I would like to request the following be applied to the 4.9 release candidate if possible. It reverts a portion of the original patch that caused this regression. I will then do this for 4.7, 4.8, 4.9, and 4.10. Please advise. Index: unit.c =================================================================== --- unit.c (revision 209325) +++ unit.c (working copy) @@ -382,9 +382,7 @@ is_trim_ok (st_parameter_dt *dtp) { /* Check rank and stride. */ - if (dtp->internal_unit_desc - && (GFC_DESCRIPTOR_RANK (dtp->internal_unit_desc) > 1 - || GFC_DESCRIPTOR_STRIDE(dtp->internal_unit_desc, 0) != 1)) + if (dtp->internal_unit_desc) return false; /* Format strings can not have 'BZ' or '/'. */ if (dtp->common.flags & IOPARM_DT_HAS_FORMAT)
Author: jvdelisle Date: Sat Apr 12 00:04:41 2014 New Revision: 209329 URL: http://gcc.gnu.org/viewcvs?rev=209329&root=gcc&view=rev Log: 2014-04-11 Jerry DeLisle <jvdelisle@gcc.gnu> PR libfortran/60810 io/unit.c (is_trim_ok): If internal unit is array, do not trim. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/unit.c
Fixed on trunk, waiting on 4.9, will proceed to 4.8 and 4.7
Author: jvdelisle Date: Sat Apr 12 18:42:15 2014 New Revision: 209338 URL: http://gcc.gnu.org/viewcvs?rev=209338&root=gcc&view=rev Log: 2014-04-12 Jerry DeLisle <jvdelisle@gcc.gnu> PR libfortran/60810 io/unit.c (is_trim_ok): If internal unit is array, do not trim. Modified: branches/gcc-4_9-branch/libgfortran/ChangeLog branches/gcc-4_9-branch/libgfortran/io/unit.c
Author: jvdelisle Date: Sat Apr 12 18:50:53 2014 New Revision: 209339 URL: http://gcc.gnu.org/viewcvs?rev=209339&root=gcc&view=rev Log: 2014-04-12 Jerry DeLisle <jvdelisle@gcc.gnu> PR libfortran/60810 gfortran.dg/arrayio_13.f90: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/arrayio_13.f90 Modified: branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
Author: jvdelisle Date: Sat Apr 12 22:52:10 2014 New Revision: 209340 URL: http://gcc.gnu.org/viewcvs?rev=209340&root=gcc&view=rev Log: 2014-04-12 Jerry DeLisle <jvdelisle@gcc.gnu> Backport from mainline PR libfortran/60810 io/unit.c (is_trim_ok): If internal unit is array, do not trim. Backport from mainline PR libfortran/60810 gfortran.dg/arrayio_13.f90: New test. Added: branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/arrayio_13.f90 Modified: branches/gcc-4_8-branch/gcc/testsuite/ChangeLog branches/gcc-4_8-branch/libgfortran/ChangeLog branches/gcc-4_8-branch/libgfortran/io/unit.c
Author: jvdelisle Date: Sun Apr 13 02:05:02 2014 New Revision: 209345 URL: http://gcc.gnu.org/viewcvs?rev=209345&root=gcc&view=rev Log: 2014-04-12 Jerry DeLisle <jvdelisle@gcc.gnu> Backport from mainline PR libfortran/60810 gfortran.dg/arrayio_13.f90: New test. PR libfortran/60810 io/unit.c (is_trim_ok): If internal unit is array, do not trim. Added: branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/arrayio_13.f90 Modified: branches/gcc-4_7-branch/gcc/testsuite/ChangeLog branches/gcc-4_7-branch/libgfortran/ChangeLog branches/gcc-4_7-branch/libgfortran/io/unit.c
Jakub - Could we get this into Fedora Rawhide? Need it to fix a broken dep in plplot. Thanks.
Author: jvdelisle Date: Tue Apr 29 03:13:34 2014 New Revision: 209888 URL: http://gcc.gnu.org/viewcvs?rev=209888&root=gcc&view=rev Log: 2014-04-28 Jerry DeLisle <jvdelisle@gcc.gnu> PR libfortran/60810 * gfortran.dg/arrayio_13.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/arrayio_13.f90 Modified: trunk/gcc/testsuite/ChangeLog
Closing.