From f527b8233498b40c8a2c616b82265f2e58aba42a Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Sun, 18 Jul 2021 21:35:53 +0200 Subject: Fortran: reject FORMAT tag of unknown type. gcc/fortran/ChangeLog: PR fortran/101084 * io.c (resolve_tag_format): Extend FORMAT check to unknown type. gcc/testsuite/ChangeLog: PR fortran/101084 * gfortran.dg/fmt_nonchar_3.f90: New test. --- gcc/fortran/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/fortran/io.c') diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 40cd76e..fc97df7 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -1763,7 +1763,7 @@ resolve_tag_format (gfc_expr *e) if (e->ts.type != BT_CHARACTER) { if (e->ts.type == BT_DERIVED || e->ts.type == BT_CLASS - || e->ts.type == BT_VOID) + || e->ts.type == BT_VOID || e->ts.type == BT_UNKNOWN) { gfc_error ("Non-character non-Hollerith in FORMAT tag at %L", &e->where); -- cgit v1.1