From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 81FB13858D28; Tue, 31 Jan 2023 17:46:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81FB13858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675187192; bh=Szum+oTQFErsyzsmME0jlEKasEsR2RagBtyiYh/TqqE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UHTo5pcq1/9svYKIrOCKBQ7SUj4guW75ZwxQvZl6LpBF4xl8hvfNUwQiX1R3wi7uR /h2gWf+Vgm3S7qS6lVHtHvwZe0W5U82s+JfFqBsNThCZzjo9cX1Sf3ogu9seOPCr5E 7+7UBPWmB09Yspj3lyKLjWqIZXdd053IS8doiOOE= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/108573] [13 Regression] '-fcompare-debug' failure (length) at -O2 Date: Tue, 31 Jan 2023 17:46:23 +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: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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=3D108573 --- Comment #3 from Jakub Jelinek --- --- gcc/ree.cc.jj 2023-01-02 09:32:45.327953792 +0100 +++ gcc/ree.cc 2023-01-31 18:36:31.253018233 +0100 @@ -875,7 +875,8 @@ combine_reaching_defs (ext_cand *cand, c for (df_link *use =3D uses; use; use =3D use->next) if (paradoxical_subreg_p (GET_MODE (*DF_REF_LOC (use->ref)), - GET_MODE (SET_DEST (*dest_sub_rtx)))) + GET_MODE (SET_DEST (*dest_sub_rtx)))= =20 + && !DEBUG_INSN_P (DF_REF_INSN (use->ref))) return false; } fixes this particular -fcompare-debug failure. Dunno though about get_uses= , it performs some checks and returns NULL if those fail (again, ignoring if the failures are from DEBUG_INSNs or something else), plus in theory there coul= d be a non-NULL ref_chain of only debug uses (though hopefully we prevent that). And there is another spot that would need the same change as above.=