io.c (resolve_tag): Check EXIST tag is a default logical.

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
This commit is contained in:
Steven G. Kargl 2010-07-05 20:14:15 +00:00
parent 71b2fd74b9
commit 92336ae10f
2 changed files with 13 additions and 0 deletions

View 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

View 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",