https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111746
Bug ID: 111746 Summary: [14 Regression] ICE: infinite recursion in try_split (emit-rtl.cc:3972) at -O2 Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: build, ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: powerpc64le-unknown-linux-gnu Created attachment 56084 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56084&action=edit reduced testcase This currently breaks build for me. Compiler output: $ $ gdb -q --args /repo/build-gcc-trunk-powerpc64le/gcc/cc1 -O2 testcase.c -quiet Reading symbols from /repo/build-gcc-trunk-powerpc64le/gcc/cc1... r (gdb) r Starting program: /repo/build-gcc-trunk-powerpc64le/gcc/cc1 -O2 testcase.c -quiet [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x0000000000a8a6cf in base_pool_allocator<memory_block_pool>::allocate (this=0x29547a0) at /repo/gcc-trunk/gcc/alloc-pool.h:405 405 VALGRIND_DISCARD (VALGRIND_MAKE_MEM_NOACCESS (header,size)); (gdb) bt #0 0x0000000000a8a6cf in base_pool_allocator<memory_block_pool>::allocate (this=0x29547a0) at /repo/gcc-trunk/gcc/alloc-pool.h:405 #1 0x0000000000b9d336 in object_allocator<df_regular_ref>::allocate (this=<optimized out>) at /repo/gcc-trunk/gcc/alloc-pool.h:505 #2 df_ref_create_structure (cl=DF_REF_REGULAR, collection_rec=0x7ffffbfff330, reg=0x7ffff1a40000, loc=0x7ffff1a40040, bb=<optimized out>, info=0x7355df0, ref_type=DF_REF_REG_USE, ref_flags=0) at /repo/gcc-trunk/gcc/df-scan.cc:2498 #3 0x0000000000b9e8a7 in df_uses_record (collection_rec=collection_rec@entry=0x7ffffbfff330, loc=<optimized out>, loc@entry=0x7ffff1a40040, ref_type=ref_type@entry=DF_REF_REG_USE, bb=bb@entry=0x7ffff7433960, insn_info=insn_info@entry=0x7355df0, flags=flags@entry=0) at /repo/gcc-trunk/gcc/df-scan.cc:2874 #4 0x0000000000b9e949 in df_uses_record (collection_rec=collection_rec@entry=0x7ffffbfff330, loc=<optimized out>, ref_type=ref_type@entry=DF_REF_REG_USE, bb=bb@entry=0x7ffff7433960, insn_info=insn_info@entry=0x7355df0, flags=<optimized out>, flags@entry=0) at /repo/gcc-trunk/gcc/df-scan.cc:2906 #5 0x0000000000b9f3a2 in df_insn_refs_collect (collection_rec=0x7ffffbfff330, bb=0x7ffff7433960, insn_info=0x7355df0) at /repo/gcc-trunk/gcc/df-scan.cc:3229 #6 0x0000000000b9fe01 in df_insn_rescan (insn=insn@entry=0x7ffff1a3f600) at /repo/gcc-trunk/gcc/df-scan.cc:1087 #7 0x0000000000c1fa80 in emit_insn_after_1 (bb=<optimized out>, after=0x7ffff1a3f540, first=0x7ffff1a3f5c0) at /repo/gcc-trunk/gcc/emit-rtl.cc:4614 #8 emit_pattern_after_noloc (x=x@entry=0x7ffff1a3f5c0, after=after@entry=0x7ffff1a3f540, bb=bb@entry=0x0, make_raw=make_raw@entry=0xc1a4d0 <make_insn_raw(rtx_def*)>) at /repo/gcc-trunk/gcc/emit-rtl.cc:4657 #9 0x0000000000c1fb9a in emit_pattern_after_setloc (pattern=pattern@entry=0x7ffff1a3f5c0, after=after@entry=0x7ffff1a3f540, loc=2147483668, make_raw=make_raw@entry=0xc1a4d0 <make_insn_raw(rtx_def*)>) at /repo/gcc-trunk/gcc/emit-rtl.cc:4808 #10 0x0000000000c20556 in emit_insn_after_setloc (loc=<optimized out>, after=0x7ffff1a3f540, pattern=0x7ffff1a3f5c0) at /repo/gcc-trunk/gcc/emit-rtl.cc:4852 #11 try_split (pat=<optimized out>, trial=0x7ffff1a3f540, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3961 #12 0x0000000000c206a5 in try_split (pat=<optimized out>, trial=0x7ffff1a3f4c0, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3972 #13 0x0000000000c206a5 in try_split (pat=<optimized out>, trial=0x7ffff1a3f440, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3972 #14 0x0000000000c206a5 in try_split (pat=<optimized out>, trial=0x7ffff1a3f3c0, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3972 #15 0x0000000000c206a5 in try_split (pat=<optimized out>, trial=0x7ffff1a3f340, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3972 #16 0x0000000000c206a5 in try_split (pat=<optimized out>, trial=0x7ffff1a3f2c0, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3972 #17 0x0000000000c206a5 in try_split (pat=<optimized out>, trial=0x7ffff1a3f240, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3972 #18 0x0000000000c206a5 in try_split (pat=<optimized out>, trial=0x7ffff1a3f1c0, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3972 #19 0x0000000000c206a5 in try_split (pat=<optimized out>, trial=0x7ffff1a3f140, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3972 #20 0x0000000000c206a5 in try_split (pat=<optimized out>, trial=0x7ffff1a3f0c0, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3972 #21 0x0000000000c206a5 in try_split (pat=<optimized out>, trial=0x7ffff1a3f040, last=last@entry=1) at /repo/gcc-trunk/gcc/emit-rtl.cc:3972 ... $ /repo/build-gcc-trunk-powerpc64le/./gcc/xgcc -v Using built-in specs. COLLECT_GCC=/repo/build-gcc-trunk-powerpc64le/./gcc/xgcc Target: powerpc64le-unknown-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --with-ppl --with-isl --with-sysroot=/usr/powerpc64le-unknown-linux-gnu --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=powerpc64le-unknown-linux-gnu --with-ld=/usr/bin/powerpc64le-unknown-linux-gnu-ld --with-as=/usr/bin/powerpc64le-unknown-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r14-4520-20231009121517-gb0892b1fc63-checking-yes-rtl-df-extra-powerpc64le Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20231009 (experimental) (GCC) The build breaks at: $ make /bin/sh ../libtool --tag CC --tag disable-shared --mode=compile /repo/build-gcc-trunk-powerpc64le/./gcc/xgcc -B/repo/build-gcc-trunk-powerpc64le/./gcc/ -B/repo/gcc-trunk//binary-trunk-r14-4520-20231009121517-gb0892b1fc63-checking-yes-rtl-df-extra-powerpc64le/powerpc64le-unknown-linux-gnu/bin/ -B/repo/gcc-trunk//binary-trunk-r14-4520-20231009121517-gb0892b1fc63-checking-yes-rtl-df-extra-powerpc64le/powerpc64le-unknown-linux-gnu/lib/ -isystem /repo/gcc-trunk//binary-trunk-r14-4520-20231009121517-gb0892b1fc63-checking-yes-rtl-df-extra-powerpc64le/powerpc64le-unknown-linux-gnu/include -isystem /repo/gcc-trunk//binary-trunk-r14-4520-20231009121517-gb0892b1fc63-checking-yes-rtl-df-extra-powerpc64le/powerpc64le-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I.. -I/repo/gcc-trunk/libstdc++-v3/../libiberty -I/repo/gcc-trunk/libstdc++-v3/../include -prefer-pic -D_GLIBCXX_SHARED -I/repo/build-gcc-trunk-powerpc64le/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/powerpc64le-unknown-linux-gnu -I/repo/build-gcc-trunk-powerpc64le/powerpc64le-unknown-linux-gnu/libstdc++-v3/include -I/repo/gcc-trunk/libstdc++-v3/libsupc++ -g -O2 -DIN_GLIBCPP_V3 -Wno-error -c cp-demangle.c libtool: compile: /repo/build-gcc-trunk-powerpc64le/./gcc/xgcc -B/repo/build-gcc-trunk-powerpc64le/./gcc/ -B/repo/gcc-trunk//binary-trunk-r14-4520-20231009121517-gb0892b1fc63-checking-yes-rtl-df-extra-powerpc64le/powerpc64le-unknown-linux-gnu/bin/ -B/repo/gcc-trunk//binary-trunk-r14-4520-20231009121517-gb0892b1fc63-checking-yes-rtl-df-extra-powerpc64le/powerpc64le-unknown-linux-gnu/lib/ -isystem /repo/gcc-trunk//binary-trunk-r14-4520-20231009121517-gb0892b1fc63-checking-yes-rtl-df-extra-powerpc64le/powerpc64le-unknown-linux-gnu/include -isystem /repo/gcc-trunk//binary-trunk-r14-4520-20231009121517-gb0892b1fc63-checking-yes-rtl-df-extra-powerpc64le/powerpc64le-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I.. -I/repo/gcc-trunk/libstdc++-v3/../libiberty -I/repo/gcc-trunk/libstdc++-v3/../include -D_GLIBCXX_SHARED -I/repo/build-gcc-trunk-powerpc64le/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/powerpc64le-unknown-linux-gnu -I/repo/build-gcc-trunk-powerpc64le/powerpc64le-unknown-linux-gnu/libstdc++-v3/include -I/repo/gcc-trunk/libstdc++-v3/libsupc++ -g -O2 -DIN_GLIBCPP_V3 -Wno-error -c cp-demangle.c -fPIC -DPIC -o cp-demangle.o xgcc: internal compiler error: Segmentation fault signal terminated program cc1 Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://gcc.gnu.org/bugs/> for instructions. make: *** [Makefile:970: cp-demangle.lo] Error 1