From c1df75d1a2eada01c913ba68bfe6a4dfbf9324b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20Schl=C3=BCter?= Date: Sat, 6 Nov 2004 13:49:13 +0100 Subject: [PATCH] re PR fortran/18023 (ice on trying to convert between int and float) PR fortran/18023 * io.c (resolve_tag): Tighten up exception for assigned FORMAT. From-SVN: r90169 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/io.c | 4 ++-- 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 + + PR fortran/18023 + * io.c (resolve_tag): Tighten up exception for assigned FORMAT. + 2004-11-06 Kazu Hirata * 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; } } -- 2.30.2