public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/111880] [11/12/13/14] False positive warning of obsolescent COMMON block with Fortran submodule
Date: Thu, 23 Nov 2023 21:20:18 +0000	[thread overview]
Message-ID: <bug-111880-4-IGzy0WMvPw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111880-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111880

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #4 from anlauf at gcc dot gnu.org ---
Potential fix:

diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 81a14653a04..962274f5d25 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -986,8 +986,8 @@ resolve_common_vars (gfc_common_head *common_block, bool
named_common)

       /* gfc_add_in_common may have been called before, but the reported
errors
         have been ignored to continue parsing.
-        We do the checks again here.  */
-      if (!csym->attr.use_assoc)
+        We do the checks again here, unless the symbol is USE associated.  */
+      if (!csym->attr.use_assoc && !csym->attr.used_in_submodule)
        {
          gfc_add_in_common (&csym->attr, csym->name, &common_block->where);
          gfc_notify_std (GFC_STD_F2018_OBS, "COMMON block at %L",

  parent reply	other threads:[~2023-11-23 21:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19 15:11 [Bug fortran/111880] New: [9/10/11/12/13] " zed.three at gmail dot com
2023-10-19 16:06 ` [Bug fortran/111880] " kargl at gcc dot gnu.org
2023-10-19 17:20 ` zed.three at gmail dot com
2023-10-19 17:32 ` sgk at troutmask dot apl.washington.edu
2023-10-20  6:48 ` [Bug fortran/111880] [11/12/13/14] " rguenth at gcc dot gnu.org
2023-11-23 21:20 ` anlauf at gcc dot gnu.org [this message]
2023-11-23 21:42 ` anlauf at gcc dot gnu.org
2023-11-23 22:00 ` anlauf at gcc dot gnu.org
2023-11-26 19:20 ` cvs-commit at gcc dot gnu.org
2023-11-30 21:21 ` cvs-commit at gcc dot gnu.org
2023-12-01 18:00 ` cvs-commit at gcc dot gnu.org
2023-12-01 18:04 ` cvs-commit at gcc dot gnu.org
2023-12-01 18:05 ` anlauf at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-111880-4-IGzy0WMvPw@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).