From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 121343860C36; Thu, 1 Feb 2024 15:58:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 121343860C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706803087; bh=FKlv65BZkCAsw6JZec9iipjtJMRq/A235XxIdd8v6FM=; h=From:To:Subject:Date:From; b=nLq5/6bERsbndir85OrzzOCEHvj1VioPtN3e/KCzYjPG9K6sEFL6PUhIvLqVrLXZC +kBGmoLhChT0cspCC/x6VqO1jJMPUpk9hthCtCBAiAkvI0iNeWGYIoVZ4lXnLLRVUv etkO8JQWOU3zfFdgySrEdWnrE1kHkAMesvlJO/cc= From: "zhendong.su at inf dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113707] New: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault Date: Thu, 01 Feb 2024 15:58:03 +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=3D113707 Bug ID: 113707 Summary: ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault 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: --- This appears to be a very recent regression (as it doesn't seem to reproduce with the latest build from Compiler Explorer).=20 [532] % 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/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-trunk --enable-sanitizers --enable-languages=3Dc,c++ --disable-werror --enable-mu= ltilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.1 20240201 (experimental) (GCC)=20 [533] %=20 [533] % gcctk -O1 small.c during GIMPLE pass: cunroll small.c: In function =E2=80=98main=E2=80=99: small.c:6:5: internal compiler error: Segmentation fault 6 | int main() { | ^~~~ 0x1161623 crash_signal ../../gcc-trunk/gcc/toplev.cc:317 0x7f2d02c7308f ??? =20=20=20=20=20=20=20 /build/glibc-wuryBv/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sig= action.c:0 0xda0c28 extract_ops_from_tree(tree_node*, tree_code*, tree_node**, tree_node**, tree_node**) ../../gcc-trunk/gcc/gimple-expr.cc:530 0xd980e0 gimple_build_assign(tree_node*, tree_node*) ../../gcc-trunk/gcc/gimple.cc:454 0x137c91c eliminate_dom_walker::eliminate_cleanup(bool) ../../gcc-trunk/gcc/tree-ssa-sccvn.cc:7494 0x13917db do_rpo_vn_1 ../../gcc-trunk/gcc/tree-ssa-sccvn.cc:8720 0x13923b3 do_rpo_vn(function*, edge_def*, bitmap_head*, bool, bool, bool, vn_lookup_kind) ../../gcc-trunk/gcc/tree-ssa-sccvn.cc:8749 0x12df179 tree_unroll_loops_completely ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1554 0x12df2b3 execute ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1673 0x12df2b3 execute ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1663 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. [534] %=20 [534] % cat small.c int printf(const char *, ...); struct a { int b; } n; int a, c, d, e, f =3D 1, g, h, j =3D 1, k, l, m, o; int main() { struct a p; int i; p.b =3D 1; if (!j) goto q; p.b =3D i =3D 0; for (; i < 1; i++) if (k) while (m) r: q: if (p.b) g =3D 1; while (1) { i =3D 0; for (; i < 5; i++) ; if (l) { while (h) ; if (o) { d =3D 0; for (; d < 8; d++) ; } } for (; e; e--) while (a) p =3D n; if (c) goto r; printf("0"); if (f) break; } return 0; }=