From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 363AC3854547; Fri, 18 Nov 2022 14:29:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 363AC3854547 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668781766; bh=yYrLu+e/NfISmokj4NLbVeF8sg1/KL38DqY/OxWCOd0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=o3q43uLcqXrkHPUlvrRzpU3W4yDEdeJrSNL3yWXzTrP86MyL0Lvw0ilMSBI75CSKY bdUoE9D0s4ePOMAJFjLvCTt/bvUUh0GigUcrYqykZC/6K6XXmnGQWpAM4R0bal5wMk D98L0yE1vkf60/gU+wljQb2g/uSaLABPGIxP6I5w= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107183] [10/11/12/13 Regression] -fcompare-debug failure (length) with -fsanitize=float-cast-overflow since r7-5708-gcfd719e7769fd43f Date: Fri, 18 Nov 2022 14:29:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target 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: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 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=3D107183 --- Comment #4 from Jakub Jelinek --- Seems the bug is in swap_rtx_condition. It is called on: (insn 10023 10021 10024 4 (set (reg:CCFP 17 flags) (unspec:CCFP [ (compare:CCFP (reg:XF 9 st(1) [orig:84 _3 ] [84]) (reg:XF 8 st [107])) ] UNSPEC_NOTRAP)) "pr107183.c":6:18 discrim 1 45 {*cmpiuxf_i387} (expr_list:REG_DEAD (reg:XF 9 st(1) [orig:84 _3 ] [84]) (expr_list:REG_DEAD (reg:XF 8 st [107]) (nil)))) on the first next_flags_user call in the function it sets insn to: (insn 10110 10024 10111 4 (set (reg:QI 3 bx [105]) (unordered:QI (reg:CCFP 17 flags) (const_int 0 [0]))) "pr107183.c":6:18 discrim 1 949 {*setcc_qi} (nil)) (still the same between -g and -g0, but already that one could differ), but then next_flags_user (the 3rd one in the function) finds (debug_insn 4 10029 10030 4 (var_location:SI D#1 (if_then_else:SI (uneq (reg:CCFP 17 flags) (const_int 0 [0])) (reg:SI 3 bx [105]) (reg:SI 0 ax [111]))) -1 (nil)) with -g and (insn 10030 10029 10032 4 (set (reg:SI 3 bx [orig:90 iftmp.0_9 ] [90]) (if_then_else:SI (uneq (reg:CCFP 17 flags) (const_int 0 [0])) (reg:SI 3 bx [105]) (reg:SI 0 ax [111]))) "pr107183.c":6:18 discrim 1 1269 {*movsicc_noc} (expr_list:REG_DEAD (reg:CCFP 17 flags) (expr_list:REG_DEAD (reg:SI 0 ax [111]) (expr_list:REG_EQUAL (if_then_else:SI (uneq (reg:CCFP 17 flags) (const_int 0 [0])) (reg:SI 3 bx [105]) (const_int 1 [0x1])) (nil))))) with -g0.=