From fe92f29faf2fc9aa7bba0f8562a35695515e00d0 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 17 Apr 2012 21:30:29 +0200 Subject: [PATCH] re PR libfortran/38199 (missed optimization: I/O performance) 2012-04-17 Tobias Burnus PR libfortran/38199 PR libfortran/50673 * io/unit.c (get_internal_unit): Properly check for the presence of the format string. From-SVN: r186548 --- libgfortran/ChangeLog | 7 +++++++ libgfortran/io/unit.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 302895bbb339..7f1a082a2648 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2012-04-17 Tobias Burnus + + PR libfortran/38199 + PR libfortran/50673 + * io/unit.c (get_internal_unit): Properly check for the presence + of the format string. + 2012-04-15 Thomas Koenig PR libfortran/38199 diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c index 6b68e1494d0b..911521d5df77 100644 --- a/libgfortran/io/unit.c +++ b/libgfortran/io/unit.c @@ -419,7 +419,7 @@ get_internal_unit (st_parameter_dt *dtp) { /* If we are not processing an array, adjust the unit record length not to include trailing blanks for list-formatted reads. */ - if (dtp->u.p.mode == READING && dtp->format == NULL) + if (dtp->u.p.mode == READING && !(dtp->common.flags & IOPARM_DT_HAS_FORMAT)) { if (dtp->common.unit == 0) {