https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110079
Bug ID: 110079 Summary: ICE with -freorder-blocks-and-partition Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: yancheng.li at foxmail dot com Target Milestone: --- When compiling the testacse attached with -S -O2 -freorder-blocks-and-partition flags, I get the following error: // target:aarch64-linux-gnu // configure:../gcc/configure --prefix=/home/lyc/2022/gcc-trunk/install --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c --enable-plugin --enable-initfini-array --disable-libgcj --without-isl --without-cloog --enable-gnu-indirect-function --build=aarch64-linux-gnu --with-stage1-ldflags=' -Wl,-z,relro,-z,now' --with-boot-ldflags=' -Wl,-z,relro,-z,now' --disable-bootstrap --with-multilib-list=lp64 // thread model:posix // gcc version 14.0.0 20230531 (experimental) (GCC) // // during RTL pass: outof_cfglayout // test.c: in function‘d’: // test.c:12:1: internal compiler error:in fixup_reorder_chain,at cfgrtl.cc:4029 // 12 | } // | ^ // 0x824a97 fixup_reorder_chain // ../../gcc/gcc/cfgrtl.cc:4029 // 0x824a97 cfg_layout_finalize() // ../../gcc/gcc/cfgrtl.cc:4571 // 0x824d5f execute // ../../gcc/gcc/cfgrtl.cc:3753 // Please submit a full bug report, with preprocessed source. // Please include the complete backtrace with any bug report. // /home/lyc/2022/gcc-trunk/install/libexec/gcc/aarch64-linux-gnu/14.0.0/cc1 -quiet test.c -quiet -dumpbase test.c -dumpbase-ext .c -mlittle-endian -mabi=lp64 -O2 -freorder-blocks-and-partition -freport-bug -o - -frandom-seed=0 -fdump-noaddr # 0 "test.c" # 0 "<built-in>" # 0 "<命令行>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 0 "<命令行>" 2 # 1 "test.c" int a; __attribute__((__cold__)) int b(char *); void d(void) { e: for (; a;) ; b(""); asm goto("" : : : : c); asm(""); c: goto e; }