summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-06 12:49:13 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-06 12:49:13 +0000
commit68bd2eff9dcbcccea0a96d32c3cebf804dd4d589 (patch)
tree765a4f22a680d2ac052e21b8484cf41e523451a2
parent65bbb0e1e7e186c1735b38a51f80b8c55c86eab5 (diff)
downloadppe42-gcc-68bd2eff9dcbcccea0a96d32c3cebf804dd4d589.tar.gz
ppe42-gcc-68bd2eff9dcbcccea0a96d32c3cebf804dd4d589.zip
PR fortran/18023
* io.c (resolve_tag): Tighten up exception for assigned FORMAT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90169 138bc75d-0d04-0410-961f-82ee72b054a4
-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 3727be29b13..d354a2cb841 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 73bb06b86f0..1ee7031a79f 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;
}
}
OpenPOWER on IntegriCloud