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.
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);
--- /dev/null
+! { dg-do compile }
+! PR fortran/101084
+
+program p
+ integer, parameter :: a(0) = 1
+ print int(a) ! { dg-error "Non-character non-Hollerith in FORMAT tag" }
+end