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) {