From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B444B3858D32; Sun, 21 Apr 2024 15:43:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B444B3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713714202; bh=4AqbNc6n3LGkz3QmqKySVoVlt9VBLq6srokxAH4q1o8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Mnf1GAZqux8tCxkTZhRgpxE4t2tbDcSxIlK7YKO/QW4TYC3nwwC4myzGf81/aMMh3 aAgfp3zyu6uB307VrYIhsCY/TLFT30gKIdMgrgFO3Pv7AbsFcsrwUkN9q/lfq0f+Ra GIu6drrM5wykqhzHK7mEEsrg87cLVPz/ED+IRccU= From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114793] wrong code at -O1 with "-fschedule-insns2 -fselective-scheduling2" on x86_64-linux-gnu (the generated code hangs) Date: Sun, 21 Apr 2024 15:43:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW 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: cc everconfirmed bug_status cf_reconfirmed_on version 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=3D114793 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jh at suse dot cz Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-04-21 Version|unknown |14.0 --- Comment #2 from H.J. Lu --- (In reply to Zhendong Su from comment #0) > It seems to be a recent regression as it does not reproduce with 13.2 and > earlier. >=20 > Compiler Explorer: https://godbolt.org/z/b3cc1MqP9 >=20 > [538] % gcctk -v > Using built-in specs. > COLLECT_GCC=3Dgcctk > COLLECT_LTO_WRAPPER=3D/local/suz-local/software/local/gcc-trunk/libexec/g= cc/ > x86_64-pc-linux-gnu/14.0.1/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-tr= unk > --enable-sanitizers --enable-languages=3Dc,c++ --disable-werror > --enable-multilib > Thread model: posix > Supported LTO compression algorithms: zlib > gcc version 14.0.1 20240421 (experimental) (GCC)=20 > [539] %=20 > [539] % gcctk -O0 small.c > [540] % ./a.out > [541] %=20 > [541] % gcctk -O1 -fschedule-insns2 -fselective-scheduling2 small.c > [542] % timeout -s 9 10 ./a.out > Killed > [543] %=20 > [543] % cat small.c > int printf(const char *, ...); > volatile int a; > int b, c, d =3D 1, e, f; > int main() { > int g =3D 1; > for (; b; b -=3D d) > g =3D e; > for (; c < 2; c++) { > if (g) { > if (!d) > printf("%d", f); > continue; > } > a; > } > return 0; > } This is caused by r14-2712.=