Summary: | [4.7/4.8/4.9/4.10 Regression] list directed io from array results in end of file | ||
---|---|---|---|
Product: | gcc | Reporter: | Orion Poplawski <orion> |
Component: | fortran | Assignee: | Jerry DeLisle <jvdelisle2> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jakub, jvdelisle2 |
Priority: | P4 | ||
Version: | 4.9.0 | ||
Target Milestone: | 4.7.4 | ||
Host: | Target: | ||
Build: | Known to work: | 4.8.2 | |
Known to fail: | 4.9.0 | Last reconfirmed: | 2014-04-11 00:00:00 |
Description
Orion Poplawski
2014-04-10 17:31:19 UTC
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. 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. 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. |