Commit c1df75d1 by Tobias Schlüter Committed by Tobias Schlüter

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
parent d08bf5fa
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> 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
* gfortranspec.c: Replace GNU CC with GCC. * gfortranspec.c: Replace GNU CC with GCC.
......
...@@ -968,7 +968,7 @@ resolve_tag (const io_tag * tag, gfc_expr * e) ...@@ -968,7 +968,7 @@ resolve_tag (const io_tag * tag, gfc_expr * e)
if (e->ts.type != tag->type) if (e->ts.type != tag->type)
{ {
/* Format label can be integer varibale. */ /* 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_error ("%s tag at %L must be of type %s", tag->name, &e->where,
gfc_basic_typename (tag->type)); gfc_basic_typename (tag->type));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment