From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F2973858D20; Fri, 3 Feb 2023 11:00:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F2973858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675422010; bh=1EJnKjpXYtEXCPV1HQ8mJfhNjngXnlxKsk6mXS6IMDw=; h=From:To:Subject:Date:From; b=Ik5ycgYDGVmpRzOnYA4hWuBYFtEZU1wKKKXZxl7WEdzqIPEg90tbCqp7eUbPhAnDs XomIKnsXCswfxLjSVvA3TvUWKwbHModDSJ4w85EIW6ASbrrFxXo5oUlYVmbr4FowXc mx20t4mbAsMz8REjNyU9ev/H7GI2KcNW2dLUnc0Y= From: "asolokha at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/108656] New: [12/13 Regression] '-fcompare-debug' failure (length) w/ -O2 -fno-ipa-pure-const -fno-tree-dce --param early-inlining-insns=0 Date: Fri, 03 Feb 2023 11:00:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: asolokha at gmx dot com 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D108656 Bug ID: 108656 Summary: [12/13 Regression] '-fcompare-debug' failure (length) w/ -O2 -fno-ipa-pure-const -fno-tree-dce --param early-inlining-insns=3D0 Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: compare-debug-failure Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- g++ 13.0.0 20220515 snapshot (g:18547874ee205d830acb31f1e3c1c89fc7725c14) f= ails -fcompare-debug check when compiling the following testcase w/ -O2 -fno-ipa-pure-const -fno-tree-dce --param early-inlining-insns=3D0: volatile int q; int m, n; int quux (int x) { return x; } int corge (int x, int y) { if (x < 0 || x > y) return 1; return 0; } int baz (void) { return m ? q : 0; } __attribute__ ((pure, returns_twice)) int bar (void) { (void) baz (); return 0; } int foo (void) { int a =3D quux (0); int b =3D corge (bar (), n); return 0; } % gcc-13 -O2 -fcompare-debug -fno-ipa-pure-const -fno-tree-dce --param early-inlining-insns=3D0 -c c46sgk3m.c gcc-13: error: c46sgk3m.c: '-fcompare-debug' failure (length) gkd diff: (note # 0 0 NOTE_INSN_DELETED) Declarations used by foo, sorted by DECL_UID: -1: static volatile int q; -0: static int m; +2: static volatile int q; +1: static int m; +0: static int n; ;; Function foo (foo, funcdef_no=3D4, cgraph_uid=3D5, symbol_order=3D7) @@ -184,17 +185,17 @@ (jump_insn # 0 0 2 (set (pc) (if_then_else (eq (reg:CCZ 17 flags) (const_int 0 [0])) - (label_ref #) + (label_ref:DI #) (pc))) "c46sgk3m.c":22:16# {*jcc} (expr_list:REG_DEAD (reg:CCZ 17 flags) (int_list:REG_BR_PROB 536870916 (nil))) - -> 12) + -> 13) (note # 0 0 [bb 3] NOTE_INSN_BASIC_BLOCK) -(insn:TI # 0 0 3 (set (reg:SI 0 ax [orig:83 iftmp.0_10 ] [83]) +(insn:TI # 0 0 3 (set (reg:SI 0 ax [orig:84 iftmp.0_10 ] [84]) (mem/v/c:SI (symbol_ref:DI ("q") [flags 0x2] ) [ q+= 0 S4 A32])) "c46sgk3m.c":22:16 discrim 1# {*movsi_internal} - (expr_list:REG_UNUSED (reg:SI 0 ax [orig:83 iftmp.0_10 ] [83]) + (expr_list:REG_UNUSED (reg:SI 0 ax [orig:84 iftmp.0_10 ] [84]) (nil))) -(code_label # 0 0 4 12 (nil) [1 uses]) +(code_label # 0 0 4 13 (nil) [1 uses]) (note # 0 0 [bb 4] NOTE_INSN_BASIC_BLOCK) (insn:TI # 0 0 4 (parallel [ (set (reg:DI 0 ax)=