[Bug fortran/56985] gcc/fortran/resolve.c:920: "'%s' in cannot appear in COMMON ..."
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56985 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from anlauf at gcc dot gnu.org --- Fixed for gcc-12.
[Bug fortran/56985] gcc/fortran/resolve.c:920: "'%s' in cannot appear in COMMON ..."
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56985 --- Comment #4 from CVS Commits --- The master branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:a88280cff3436d0b6ab454514e5a3b97a543e9a5 commit r12-3295-ga88280cff3436d0b6ab454514e5a3b97a543e9a5 Author: Harald Anlauf Date: Wed Sep 1 19:05:47 2021 +0200 Fortran - improve wording of error message gcc/fortran/ChangeLog: PR fortran/56985 * resolve.c (resolve_common_vars): Fix grammar and improve wording of error message rejecting an unlimited polymorphic in COMMON.
[Bug fortran/56985] gcc/fortran/resolve.c:920: "'%s' in cannot appear in COMMON ..."
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56985 anlauf at gcc dot gnu.org changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #3 from anlauf at gcc dot gnu.org --- Submitted: https://gcc.gnu.org/pipermail/fortran/2021-August/056457.html
[Bug fortran/56985] gcc/fortran/resolve.c:920: "'%s' in cannot appear in COMMON ..."
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, >declared_at); if (csym->ts.type != BT_DERIVED) The message is checked in gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03
[Bug fortran/56985] gcc/fortran/resolve.c:920: "'%s' in cannot appear in COMMON ..."
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56985 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-08-30 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- if (UNLIMITED_POLY (csym)) gfc_error_now ("%qs in cannot appear in COMMON at %L " "[F2008:C5100]", csym->name, >declared_at); Should most likely be: if (UNLIMITED_POLY (csym)) gfc_error_now ("Variable %qs in cannot appear in COMMON at %L " "[F2008:C5100]", csym->name, >declared_at);