From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D9A0F3858C74; Tue, 26 Mar 2024 19:23:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9A0F3858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711480996; bh=hkI8kbSgIMx+jNQ0QGyq6cpCBVRmeiURFsJK4i5wBaw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=y7ktDIw0xTNeoHYeFV14SZMdIrWNHOMyXvzsrWYjWToQrxSmPQiRRQCE/Yza9lRMY JlGKpd0McyY0zT0QtS4+7ezrFFuPd/YOZQ7Ah3+Fkg1djTq3Ex2V80hretdAYmVuVW Vja1fPpLbH56A9Iz7X2G5yXi3CdjQc/Hugz7NfIw= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/114475] [14 Regression] Regression with iso_c_binding and submodules Date: Tue, 26 Mar 2024 19:23:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114475 --- Comment #2 from anlauf at gcc dot gnu.org --- (In reply to J=C3=BCrgen Reuter from comment #1) > I suspect this commit here, > https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommit; > h=3D44c0398e65347def316700911a51ca8b4ec0a411 > but not totally certain. The following patch fixes the apparent regression: diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc index 9a042cd7040..68d16a9a378 100644 --- a/gcc/fortran/expr.cc +++ b/gcc/fortran/expr.cc @@ -3517,6 +3563,7 @@ check_restricted (gfc_expr *e) if (e->error || sym->attr.in_common || sym->attr.use_assoc + || sym->attr.used_in_submodule || sym->attr.dummy || sym->attr.implied_index || sym->attr.flavor =3D=3D FL_PARAMETER Looks like the commit actually uncovered a latent issue. Mikael, do you want to follow up?=