From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 357CD385DC35; Fri, 28 Jan 2022 02:51:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 357CD385DC35 From: "asolokha at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/104263] New: [10/11/12 Regression] '-fcompare-debug' failure (length) w/ -O2 -fnon-call-exceptions -fno-inline-small-functions Date: Fri, 28 Jan 2022 02:51:04 +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: Fri, 28 Jan 2022 02:51:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104263 Bug ID: 104263 Summary: [10/11/12 Regression] '-fcompare-debug' failure (length) w/ -O2 -fnon-call-exceptions -fno-inline-small-functions 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 20220123 snapshot (g:2da90ad39bf8fa9ee287e040d1f4411cb7a2e7ed) f= ails -fcompare-debug check when compiling the following testcase w/ -O2 -fnon-call-exceptions -fno-inline-small-functions: int n; int bar (void) { int a; n =3D 0; a =3D 0; return n; } __attribute__ ((pure, returns_twice)) int foo (void) { n =3D bar () + 1; foo (); return 0; } % gcc-12.0.1 -O2 -fcompare-debug -fnon-call-exceptions -fno-inline-small-functions -gno-statement-frontiers -c ovslsrlb.c x86_64-pc-linux-gnu-gcc-12.0.1: error: ovslsrlb.c: '-fcompare-debug' failure (length) For x86_64 the difference looks like this, though the failure is not target-specific: --- ovslsrlb.c.gkd 2022-01-28 09:42:43.969435346 +0700 +++ ovslsrlb.gk.c.gkd 2022-01-28 09:42:43.987435394 +0700 @@ -40,8 +40,8 @@ (note # 0 0 [bb 2] NOTE_INSN_BASIC_BLOCK) (note # 0 0 NOTE_INSN_PROLOGUE_END) (note # 0 0 NOTE_INSN_FUNCTION_BEG) -(insn:TI # 0 0 2 (set (mem/c:SI (symbol_ref:DI ("n") [flags 0x2] ) [ MEM[(int *)&n]+0 S4 A32]) - (const_int 1 [0x1])) "ovslsrlb.c":8:5# {*movsi_internal} +(insn:TI # 0 0 2 (set (mem/c:SI (symbol_ref:DI ("n") [flags 0x2] ) [ n+0 S4 A32]) + (const_int 1 [0x1])) "ovslsrlb.c":17:5# {*movsi_internal} (nil)) (insn # 0 0 2 (parallel [ (set (reg:DI 0 ax)=