From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A09D93858409; Fri, 21 Jul 2023 12:27:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A09D93858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689942439; bh=QIF9OgUpixYu1SFeUo/sxbUbx6ErJx8V7MYSICHTMEM=; h=From:To:Subject:Date:From; b=WqYqcMxLKdMnlgqpv/csiLWRFLs2H/npMzVbhXihrYvv/1eJwp6xXlGVLvjlYA7q5 hDZJPRE9+sIMwxYi0vSFB0GiGqRhYDxBJbgG5ey7Jln54VCQmXlZDu45g3dQGuSQLj LuigC9QJgi3PchAnk2m3bCTEki1m3mRa/jXUlirU= From: "zhendong.su at inf dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110766] New: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 Date: Fri, 21 Jul 2023 12:27:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization 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=3D110766 Bug ID: 110766 Summary: ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- It seems to be related to the recently fixed PR 110669.=20 Compiler Explorer: https://godbolt.org/z/85drx858c [524] % gcctk -v Using built-in specs. COLLECT_GCC=3Dgcctk COLLECT_LTO_WRAPPER=3D/local/home/suz/suz-local/software/local/gcc-trunk/bi= n/../libexec/gcc/x86_64-pc-linux-gnu/14.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 Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20230721 (experimental) [master r14-924-gd709841ae0f] (G= CC)=20 [525] %=20 [525] % gcctk -O3 small.c during GIMPLE pass: sccp small.c: In function =E2=80=98main=E2=80=99: small.c:4:5: internal compiler error: in gimple_phi_arg_def_from_edge, at gimple.h:4699 4 | int main() { | ^~~~ 0x80fe21 gimple_phi_arg_def_from_edge(gphi const*, edge_def const*) ../../gcc-trunk/gcc/gimple.h:4699 0x811332 gimple_phi_arg_def_from_edge(gphi const*, edge_def const*) ../../gcc-trunk/gcc/tree.h:3700 0x811332 final_value_replacement_loop(loop*) ../../gcc-trunk/gcc/tree-scalar-evolution.cc:3733 0x118f795 execute ../../gcc-trunk/gcc/tree-ssa-loop.cc:411 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. [526] %=20 [526] % cat small.c int a, b, c, e; short d, f; int g(int h) { return h > a ? h : h << a; } int main() { while (e) { b =3D 0; for (; b < 3; b++) if (c) { e =3D g(1); f =3D e | d; } d =3D 0; } return 0; }=