From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AEEDA3858C2C; Thu, 28 Apr 2022 10:04:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEEDA3858C2C From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/105415] [9/10/11/12 Regression] '-fcompare-debug' failure w/ -O2 -ftree-parallelize-loops=2 since r7-4900-g59ec925b1199f9 Date: Thu, 28 Apr 2022 10:04:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: compare-debug-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 10.4 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 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: Thu, 28 Apr 2022 10:04:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105415 --- Comment #4 from Jakub Jelinek --- Wonder about: --- gcc/alias.cc.jj 2022-02-21 16:51:50.261232505 +0100 +++ gcc/alias.cc 2022-04-28 11:57:18.940425126 +0200 @@ -2219,8 +2219,10 @@ compare_base_symbol_refs (const_rtx x_ba || (!TREE_STATIC (x_decl) && !TREE_PUBLIC (x_decl))) return 0; - symtab_node *x_node =3D symtab_node::get_create (x_decl) - ->ultimate_alias_target (); + symtab_node *x_node =3D symtab_node::get (x_decl); + if (x_node =3D=3D NULL) + return 0; + x_node =3D x_node->ultimate_alias_target (); /* External variable cannot be in section anchor. */ if (!x_node->definition) return 0; It would surprise me if we needed to create varpool nodes so late, if they don't exist, with the exception of DEBUG_INSNs referencing already removed symbols I don't see the reason why the varpool nodes wouldn't be present. Another option would be for the x_node =3D=3D NULL case to use x_decl rathe= r than x_node->decl, i.e. just assume x_decl isn't an alias if it doesn't have a varpool node.=