From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4FA74384385B; Fri, 5 Mar 2021 19:08:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4FA74384385B From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/97927] gfortran: ICE in lookup_field_for_decl, at tree-nested.c:288 Date: Fri, 05 Mar 2021 19:08:02 +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: 10.2.1 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 19:08:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97927 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW --- Comment #14 from Tobias Burnus --- (In reply to Tobias Burnus from comment #13) > align:32 warn_if_not_align:0 context modmpi> chain > >=20 >=20 > I am not quite sure whether the context is right or not: > context =20 > but it does not really look wrong, does it? The following compiles =E2=80=93 but I don't know whether it makes sense: --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -382,7 +382,8 @@ static tree lookup_field_for_decl (struct nesting_info *info, tree decl, enum insert_option insert) { - gcc_checking_assert (decl_function_context (decl) =3D=3D info->context); + gcc_checking_assert (TREE_CODE (DECL_CONTEXT (decl)) =3D=3D NAMESPACE_DE= CL + || decl_function_context (decl) =3D=3D info->context= ); if (insert =3D=3D NO_INSERT) {=