aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r--gcc/fortran/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 73bb06b..1ee7031 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -968,10 +968,10 @@ resolve_tag (const io_tag * tag, gfc_expr * e)
if (e->ts.type != tag->type)
{
/* Format label can be integer varibale. */
- if (tag != &tag_format)
+ if (tag != &tag_format || e->ts.type != BT_INTEGER)
{
gfc_error ("%s tag at %L must be of type %s", tag->name, &e->where,
- gfc_basic_typename (tag->type));
+ gfc_basic_typename (tag->type));
return FAILURE;
}
}