From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C708E385780D; Wed, 9 Feb 2022 11:43:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C708E385780D From: "asolokha at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/104459] New: [9/10/11/12 Regression] '-fcompare-debug' failure w/ -O2 -funswitch-loops -fno-tree-dce Date: Wed, 09 Feb 2022 11:43:40 +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: 12.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 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, 09 Feb 2022 11:43:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104459 Bug ID: 104459 Summary: [9/10/11/12 Regression] '-fcompare-debug' failure w/ -O2 -funswitch-loops -fno-tree-dce Product: gcc Version: 12.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: --- gcc 12.0.1 20220206 snapshot (g:8eb329e963593342855b6072e5692659107337b7) f= ails -fcompare-debug check when compiling the following testcase w/ -O2 -funswitch-loops -fno-tree-dce: void foo (int x, int y) { unsigned int a; for (;;) { short int *p =3D (short int *) &x; unsigned int q =3D 0; a /=3D 2; if (a) { q -=3D y; while (q) { } } if (x) { for (q =3D 0; q !=3D 1; q +=3D 2) { unsigned int n; n =3D *p ? 0 : q; y +=3D n < 1; n =3D a || *p; if (n % x =3D=3D 0) y /=3D x; } } } } % gcc-12.0.1 -O2 -fcompare-debug -funswitch-loops -fno-tree-dce -c rfygrmu3= .c gcc-12.0.1: error: rfygrmu3.c: '-fcompare-debug' failure --- rfygrmu3.c.gkd 2022-02-09 18:38:41.086339468 +0700 +++ rfygrmu3.gk.c.gkd 2022-02-09 18:38:41.117339440 +0700 @@ -32,7 +32,7 @@ (pc))) "rfygrmu3.c":20:10# {*jcc} (expr_list:REG_DEAD (reg:CCZ 17 flags) (int_list:REG_BR_PROB 118111604 (nil))) - -> 18) + -> 19) (code_label # 0 0 4 4 (nil) [1 uses]) (note # 0 0 [bb 4] NOTE_INSN_BASIC_BLOCK) (insn:TI # 0 0 4 (set (reg/v:SI 36 r8 [orig:89 a ] [89]) @@ -79,7 +79,7 @@ (nil) -> 3) (barrier # 0 0) -(code_label # 0 0 7 18 (nil) [1 uses]) +(code_label # 0 0 7 19 (nil) [1 uses]) (note # 0 0 [bb 7] NOTE_INSN_BASIC_BLOCK) (insn:TI # 0 0 7 (set (reg:CCZ 17 flags) (compare:CCZ (reg:HI 5 di [orig:94 x ] [94])=