From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 87504385781E; Sun, 17 Jul 2022 21:49:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87504385781E From: "zhendong.su at inf dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106303] [13 Regression] ICE on valid code at -O3 with -fno-inline-small-functions on x86_64-linux-gnu: in extract_insn, at recog.cc:2791 since r13-1607-gc3ed9e0d6e96d869 Date: Sun, 17 Jul 2022 21:49:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zhendong.su at inf dot ethz.ch 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: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 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: Sun, 17 Jul 2022 21:49:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106303 --- Comment #4 from Zhendong Su --- Here is another repro that ICEs at -O2 (without -fno-inline-small-functions= ). [570] % 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 --prefix=3D/local/suz-local/software/local/gcc-trunk --enable-sanitizers --enable-languages=3Dc,c++ --disable-werror --enable-multilib --with-system= -zlib Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20220717 (experimental) [master r13-1722-g7bcd7f47359] (= GCC) [571] % [571] % gcctk -O2 small.c small.c: In function =E2=80=98n=E2=80=99: small.c:18:1: error: unrecognizable insn: 18 | } | ^ (insn 41 25 32 8 (set (reg:TI 85 [ D.2008 ]) (reg:V1TI 90 [ D.2008 ])) "small.c":16:12 -1 (expr_list:REG_DEAD (reg:V1TI 90 [ D.2008 ]) (expr_list:REG_EQUAL (mem/c:TI (symbol_ref:DI ("k") [flags 0x2] ) [2 k+0 S16 A128])=20=20 (nil)))) during RTL pass: subreg3 small.c:18:1: internal compiler error: in extract_insn, at recog.cc:2791 0x722ccc _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc-trunk/gcc/rtl-error.cc:108 0x722ce8 _fatal_insn_not_found(rtx_def const*, char const*, int, char const= *) ../../gcc-trunk/gcc/rtl-error.cc:116 0x72121b extract_insn(rtx_insn*) ../../gcc-trunk/gcc/recog.cc:2791 0x1d4e697 decompose_multiword_subregs ../../gcc-trunk/gcc/lower-subreg.cc:1555 0x1d4f51d execute ../../gcc-trunk/gcc/lower-subreg.cc:1820 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. [572] % [572] % cat small.c struct a { int b; int c; int d; int e; } i, j, k, l; int f, g, h; static struct a n() { if (f) while (1) i =3D k; j =3D k; for (; g; g++) ; if (h) return k; return j; } void o() { l =3D n(); } int main() { o(); return 0; }=