aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-24 12:24:29 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-24 12:24:29 +0000
commit88904b3b9adaf165ce7325a4c5f4a16d3678ac61 (patch)
tree6e109857c42d78192a7a81ae395c4e9ca1a88426 /libgfortran
parent416dafb3086f7d714d833c193c6ecaf66fb87b31 (diff)
2009-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/39528 * io/list_read.c (list_formatted_read_scalar): Move check for read completion to just after the check for a repeated value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145030 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/list_read.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 4613306ce79..500280604f0 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/39528
+ * io/list_read.c (list_formatted_read_scalar): Move check for read
+ completion to just after the check for a repeated value.
+
2009-03-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/39402
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 1f1023c10d2..6b22d34a0b6 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008
+/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Andy Vaught
Namelist input contributed by Paul Thomas
@@ -1720,9 +1720,6 @@ list_formatted_read_scalar (st_parameter_dt *dtp, volatile bt type, void *p,
}
else
{
- if (dtp->u.p.input_complete)
- goto cleanup;
-
if (dtp->u.p.repeat_count > 0)
{
if (check_type (dtp, type, kind))
@@ -1730,6 +1727,9 @@ list_formatted_read_scalar (st_parameter_dt *dtp, volatile bt type, void *p,
goto set_value;
}
+ if (dtp->u.p.input_complete)
+ goto cleanup;
+
if (dtp->u.p.at_eol)
finish_separator (dtp);
else