https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110742
Bug ID: 110742 Summary: [14 Regression] cc1plus ICE "Floating point exception" during profiled bootstrap since commit 08b99fe8ad6 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: thiago.bauermann at linaro dot org CC: saaadhu at gcc dot gnu.org Target Milestone: --- Host: armv8l-unknown-linux-gnueabihf Target: armv8l-unknown-linux-gnueabihf Created attachment 55583 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55583&action=edit Output of running with "-v -save-temps -freport-bug". Our CI detected that commit 08b99fe8ad6c "ira: Skip empty regclass when setting up reg class relations" introduced an ICE in a profiled bootstrap build on armv8l-linux-gnueabihf: /home/thiago.bauermann/.cache/builds/gcc-native-aarch32/./prev-gcc/xg++ -B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/./prev-gcc/ -B/usr/local/armv8l-unknown-linux-gnueabihf/bin/ -nostdinc++ -B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/src/.libs -B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/libsupc++/.libs -I/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/include/armv8l-unknown-linux-gnueabihf -I/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/include -I/home/thiago.bauermann/src/gcc/libstdc++-v3/libsupc++ -L/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/src/.libs -L/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/libsupc++/.libs -fno-PIE -c -g -O2 -fno-checking -gtoggle -fprofile-generate -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -fno-PIE -I. -I. -I/home/thiago.bauermann/src/gcc/gcc -I/home/thiago.bauermann/src/gcc/gcc/. -I/home/thiago.bauermann/src/gcc/gcc/../include -I/home/thiago.bauermann/src/gcc/gcc/../libcpp/include -I/home/thiago.bauermann/src/gcc/gcc/../libcody -I/home/thiago.bauermann/src/gcc/gcc/../libdecnumber -I/home/thiago.bauermann/src/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/thiago.bauermann/src/gcc/gcc/../libbacktrace -o ira.o -MT ira.o -MMD -MP -MF ./.deps/ira.TPo /home/thiago.bauermann/src/gcc/gcc/ira.cc during GIMPLE pass: slp /home/thiago.bauermann/src/gcc/gcc/ira.cc: In function ‘void setup_reg_class_relations()’: /home/thiago.bauermann/src/gcc/gcc/ira.cc:1198:1: internal compiler error: Floating point exception 1198 | setup_reg_class_relations (void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ 0x12ff9a5 crash_signal /home/thiago.bauermann/src/gcc/gcc/toplev.cc:314 0xf7a0d6df ??? ../sysdeps/unix/sysv/linux/arm/sigrestorer.S:64 0xf79fdb05 ??? ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46 0xf7a3d2c9 __pthread_kill_implementation ./nptl/pthread_kill.c:43 0xf7a0c83f __GI_raise ../sysdeps/posix/raise.c:26 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. make[3]: *** [Makefile:1181: ira.o] Error 1 make[3]: Leaving directory '/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc' make[2]: *** [Makefile:5150: all-stageprofile-gcc] Error 2 make[2]: Leaving directory '/home/thiago.bauermann/.cache/builds/gcc-native-aarch32' make[1]: *** [Makefile:26321: stageprofile-bubble] Error 2 make[1]: Leaving directory '/home/thiago.bauermann/.cache/builds/gcc-native-aarch32' make: *** [Makefile:1085: all] Error 2 I confirmed that the problem is still present in trunk as of commit e029635cb72e "[modula2] Variable analysis understands DISPOSE and NIL" from today. I'm attaching the output of running with "-v -save-temps -freport-bug", as well as the corresponding ira.ii. Tested on Ubuntu 22.04 with: $ src/gcc/configure \ SHELL=/bin/bash \ --with-gnu-as \ --with-gnu-ld \ --disable-libmudflap \ --enable-lto \ --enable-shared \ --without-included-gettext \ --enable-nls \ --with-system-zlib \ --disable-sjlj-exceptions \ --enable-gnu-unique-object \ --enable-linker-build-id \ --disable-libstdcxx-pch \ --enable-c99 \ --enable-clocale=gnu \ --enable-libstdcxx-debug \ --enable-long-long \ --with-cloog=no \ --with-ppl=no \ --with-isl=no \ --disable-multilib \ --with-float=hard \ --with-fpu=neon-fp-armv8 \ --with-mode=thumb \ --with-arch=armv8-a \ --enable-threads=posix \ --enable-multiarch \ --enable-libstdcxx-time=yes \ --enable-gnu-indirect-function \ --disable-werror \ --enable-checking=yes \ --enable-bootstrap \ --enable-languages=c,c++,fortran,lto \ && make profiledbootstrap \ SHELL=/bin/bash \ -w \ -j 40 \ CFLAGS_FOR_BUILD="-pipe -g -O2" \ CXXFLAGS_FOR_BUILD="-pipe -g -O2" \ LDFLAGS_FOR_BUILD="-static-libgcc" \ MAKEINFOFLAGS=--force \ BUILD_INFO="" \ MAKEINFO=echo