From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3A19E3858403; Mon, 7 Nov 2022 19:59:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A19E3858403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667851142; bh=moE14p8IPGt6Fqe9jqF8uHXltFrXOQR/m0G9SgU43dg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Q2y070gz8VOGzO8/NrApGIBjCRXcgeuM3bFEcVFw978oQFtgwP0sDmeTKgaDVHl/9 wMCFhY9yoixFh2niWDgdlr3mwZodrf3htPO/wlqSRKvlMA+rcc0kpyiDjX/CxBNaAk pJaY1v8RKFM9YCYmH0eKZXuChaOwAy2m9pKdIM8w= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107559] ICE in resolve_equivalence, at fortran/resolve.cc:17230 Date: Mon, 07 Nov 2022 19:59:01 +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: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf 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 everconfirmed cf_reconfirmed_on cc 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=3D107559 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2022-11-07 CC| |anlauf at gcc dot gnu.org --- Comment #1 from anlauf at gcc dot gnu.org --- Another NULL pointer dereference. Potential fix: diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc index 9202e2f10ad..5ff1cd070ac 100644 --- a/gcc/fortran/resolve.cc +++ b/gcc/fortran/resolve.cc @@ -17218,6 +17218,7 @@ resolve_equivalence (gfc_equiv *eq) "statement at %L with different type objects"; if ((object =3D=3D2 && last_eq_type =3D=3D SEQ_MIXED + && last_where && !gfc_notify_std (GFC_STD_GNU, msg, first_sym->name, last_wher= e)) || (eq_type =3D=3D SEQ_MIXED && !gfc_notify_std (GFC_STD_GNU, msg, sym->name, &e->where))) @@ -17227,6 +17228,7 @@ resolve_equivalence (gfc_equiv *eq) "statement at %L with objects of different type"; if ((object =3D=3D2 && last_eq_type =3D=3D SEQ_NONDEFAULT + && last_where && !gfc_notify_std (GFC_STD_GNU, msg, first_sym->name, last_wher= e)) || (eq_type =3D=3D SEQ_NONDEFAULT && !gfc_notify_std (GFC_STD_GNU, msg, sym->name, &e->where)))=