From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 057E93858C2D; Wed, 18 May 2022 11:49:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 057E93858C2D From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/105630] [10/11/12/13 Regression] '-fcompare-debug' failure w/ -O1 -ftree-parallelize-loops=2 Date: Wed, 18 May 2022 11:49:06 +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: 13.0 X-Bugzilla-Keywords: compare-debug-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 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 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: Wed, 18 May 2022 11:49:07 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105630 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek --- Ah, the difference between this and PR105415 is that here the VAR_DECL n has DECL_RTL set, so we don't go through /* This decl was probably optimized away. */ if (!op0 /* At least label RTXen are sometimes replaced by NOTE_INSN_DELETED_LABEL. Any notes here are not handled by copy_rtx. */ || NOTE_P (op0)) { if (!VAR_P (exp) || DECL_EXTERNAL (exp) || !TREE_STATIC (exp) || !DECL_NAME (exp) || DECL_HARD_REGISTER (exp) || DECL_IN_CONSTANT_POOL (exp) || mode =3D=3D VOIDmode || symtab_node::get (exp) =3D=3D NULL) return NULL; op0 =3D make_decl_rtl_for_debug (exp); if (!MEM_P (op0) || GET_CODE (XEXP (op0, 0)) !=3D SYMBOL_REF || SYMBOL_REF_DECL (XEXP (op0, 0)) !=3D exp) return NULL; } because op0 is non-NULL, so we go with else op0 =3D copy_rtx (op0); instead. So perhaps something like: else if (VAR_P (exp) && is_global_var (exp) && symtab_node::get (exp) =3D=3D NULL) return NULL; before the else or so? But, we'll need to compare the effects on debug info with that change too.=