OSDN Git Service

2009-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / libgfortran / io / list_read.c
index 1f1023c..6b22d34 100644 (file)
@@ -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