aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/io.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 3727be2..d354a2c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/18023
+ * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
+
2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
* gfortranspec.c: Replace GNU CC with GCC.
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;
}
}