]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
io.c (resolve_tag): Check EXIST tag is a default logical.
authorSteven G. Kargl <kargl@gcc.gnu.org>
Mon, 5 Jul 2010 20:14:15 +0000 (20:14 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Mon, 5 Jul 2010 20:14:15 +0000 (20:14 +0000)
2010-07-05  Steven G. Kargl  <kargl@gcc.gnu.org>

    fortran/44797
    * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.

From-SVN: r161852

gcc/fortran/ChangeLog
gcc/fortran/io.c

index 621879b5b1b34624631ed4151d72fec30a216856..611f6d982b932f73fad0cad05a1ad0da43cabd03 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-05  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       fortran/44797
+       * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
+
 2010-07-05  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/44596
index f9a6d7b12404f96c764c4d893793d21b39051d77..afbde0210b4618d153def20be256d2fb1cb129b0 100644 (file)
@@ -1497,6 +1497,14 @@ resolve_tag (const io_tag *tag, gfc_expr *e)
        return FAILURE;
     }
 
+  if (tag == &tag_exist && e->ts.kind != gfc_default_logical_kind)
+    {
+      if (gfc_notify_std (GFC_STD_F2008, "Fortran 2008: Nondefault LOGICAL "
+                         "in %s tag at %L", tag->name, &e->where)
+         == FAILURE)
+       return FAILURE;
+    }
+
   if (tag == &tag_convert)
     {
       if (gfc_notify_std (GFC_STD_GNU, "Extension: CONVERT tag at %L",