summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-17 19:30:29 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-17 19:30:29 +0000
commit8d4fbf5a40e73d0735ef8b844ac12d2db4467485 (patch)
treed92440b2b65d91cafe991e4cd0de582c164cee0b
parent3c8b9899802f170a372b8ce0ad23fda310c041d7 (diff)
downloadgcc-8d4fbf5a40e73d0735ef8b844ac12d2db4467485.tar.gz
2012-04-17 Tobias Burnus <burnus@net-b.de>
PR libfortran/38199 PR libfortran/50673 * io/unit.c (get_internal_unit): Properly check for the presence of the format string. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186548 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libgfortran/ChangeLog7
-rw-r--r--libgfortran/io/unit.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 302895bbb33..7f1a082a264 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,10 @@
+2012-04-17 Tobias Burnus <burnus@net-b.de>
+
+ 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 <tkoenig@gcc.gnu.org>
PR libfortran/38199
diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c
index 6b68e1494d0..911521d5df7 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)
{