https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56985
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #2 from anlauf at gcc dot gnu.org --- Actually the following seems better to me, as the location is that of the declaration and not of the COMMON block: diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index f641d0d4dae..8e5ed1c032c 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -979,7 +979,7 @@ resolve_common_vars (gfc_common_head *common_block, bool named_common) } if (UNLIMITED_POLY (csym)) - gfc_error_now ("%qs in cannot appear in COMMON at %L " + gfc_error_now ("%qs at %L cannot appear in COMMON " "[F2008:C5100]", csym->name, &csym->declared_at); if (csym->ts.type != BT_DERIVED) The message is checked in gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03