From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 177423858D32; Sat, 1 Oct 2022 14:27:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 177423858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664634424; bh=3pcpSibnyISgulVgvZaSZokeGbmHMukkLzove0rkUII=; h=From:To:Subject:Date:From; b=MYZIYBP6EpyUdjp6Bp9AzjmVuIrVnPeteivB2o0zaRSw1Hrz8DF/56PtzNls5xovZ vTo2+7xODzBZG6SzuetL0nllOq9KZUBuOHeiX+uAHOMxv3h2ytsRSjYiMol00h6tHg n+p9/QesD6WQaxwnMSw54XiuutU2fSzqH749Q/Is= From: "zhendong.su at inf dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/107110] New: failure (length) with -fcompare-debug at -O1 and above Date: Sat, 01 Oct 2022 14:27:03 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zhendong.su at inf dot ethz.ch 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 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=3D107110 Bug ID: 107110 Summary: failure (length) with -fcompare-debug at -O1 and above Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- It appears to be a regression from 10.* and affect 11.* and later.=20 Compiler Explorer: https://godbolt.org/z/Gvh15c5KE [529] % gcctk -v Using built-in specs. COLLECT_GCC=3Dgcctk COLLECT_LTO_WRAPPER=3D/local/suz-local/software/local/gcc-trunk/libexec/gcc= /x86_64-pc-linux-gnu/13.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --enable-checking=3Dyes --prefix=3D/local/suz-local/software/local/gcc-trunk --enable-sanitizers --enable-languages=3Dc,c++ --disable-werror --enable-mu= ltilib --with-system-zlib Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20221001 (experimental) [master r13-3010-g2555071c954] (= GCC)=20 [530] %=20 [530] % gcctk -O1 -fcompare-debug small.c gcctk: error: small.c: =E2=80=98-fcompare-debug=E2=80=99 failure (length) [531] %=20 [531] % cat small.c int a, b; void c() { int d, e =3D 1, f =3D 1, g, h =3D 0; for (; 1; h++) { if (d) f =3D 0; if (d) break; if (g) goto L; g =3D f; } for (; h < 1;) L: for (;;) { int j, k =3D e; if (a) { break; ; } e =3D 0; while (b <=3D k) ; break; &j; } } int main() { if (a) c(); return 0; }=