https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110934
Bug ID: 110934 Summary: m68k: ICE with -fzero-call-used-regs=all compiling openssh 9.3p2 Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: wbx at openadk dot org Target Milestone: --- Hi, following ICE is generated when using Buildroot to compile OpenSSH 9.3p2 for m68k. /home/browa22-ext/openssh/output/host/bin/m68k-buildroot-linux-uclibc-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -pipe -Wno-error=format-truncation -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -Wimplicit-fallthrough -Wmisleading-indentation -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fzero-call-used-regs=all -ftrivial-auto-var-init=zero -fno-builtin-memset -fPIC -I. -I.. -I. -I./.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE -DHAVE_CONFIG_H -c bsd-closefrom.c during RTL pass: zero_call_used_regs bsd-closefrom.c: In function ‘closefrom’: bsd-closefrom.c:151:1: internal compiler error: in change_address_1, at emit-rtl.cc:2287 151 | } | ^ 0x7f5f7d66f189 __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7f5f7d66f244 __libc_start_main_impl ../csu/libc-start.c:381 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <http://bugs.buildroot.net/> for instructions. Using -fzero-call-used-regs=used fixes the build issue. gcc -v: /home/browa22-ext/openssh/output/host/bin/m68k-buildroot-linux-uclibc-gcc -v Using built-in specs. COLLECT_GCC=/home/browa22-ext/openssh/output/host/bin/m68k-buildroot-linux-uclibc-gcc.br_real COLLECT_LTO_WRAPPER=/home/browa22-ext/openssh/output/host/libexec/gcc/m68k-buildroot-linux-uclibc/13.2.0/lto-wrapper Target: m68k-buildroot-linux-uclibc Configured with: ./configure --prefix=/home/browa22-ext/openssh/output/host --sysconfdir=/home/browa22-ext/openssh/output/host/etc --enable-static --target=m68k-buildroot-linux-uclibc --with-sysroot=/home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --enable-plugins --enable-lto --with-gmp=/home/browa22-ext/openssh/output/host --with-mpc=/home/browa22-ext/openssh/output/host --with-mpfr=/home/browa22-ext/openssh/output/host --with-pkgversion='Buildroot 2023.08-rc1-23-g3693462a1f' --with-bugurl=http://bugs.buildroot.net/ --without-zstd --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --enable-tls --enable-threads --without-isl --without-cloog --with-cpu=68040 --enable-languages=c --with-build-time-tools=/home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/bin --enable-shared --disable-libgomp Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.2.0 (Buildroot 2023.08-rc1-23-g3693462a1f) COMPILER_PATH=/home/browa22-ext/openssh/output/host/libexec/gcc/m68k-buildroot-linux-uclibc/13.2.0/:/home/browa22-ext/openssh/output/host/libexec/gcc/m68k-buildroot-linux-uclibc/13.2.0/:/home/browa22-ext/openssh/output/host/libexec/gcc/m68k-buildroot-linux-uclibc/:/home/browa22-ext/openssh/output/host/lib/gcc/m68k-buildroot-linux-uclibc/13.2.0/:/home/browa22-ext/openssh/output/host/lib/gcc/m68k-buildroot-linux-uclibc/:/home/browa22-ext/openssh/output/host/lib/gcc/m68k-buildroot-linux-uclibc/13.2.0/../../../../m68k-buildroot-linux-uclibc/bin/ LIBRARY_PATH=/home/browa22-ext/openssh/output/host/lib/gcc/m68k-buildroot-linux-uclibc/13.2.0/:/home/browa22-ext/openssh/output/host/lib/gcc/m68k-buildroot-linux-uclibc/13.2.0/../../../../m68k-buildroot-linux-uclibc/lib/:/home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot/lib/:/home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/ COLLECT_GCC_OPTIONS='--sysroot=/home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot' '-v' '-mcpu=68040' '-dumpdir' 'a.' /home/browa22-ext/openssh/output/host/libexec/gcc/m68k-buildroot-linux-uclibc/13.2.0/collect2 -plugin /home/browa22-ext/openssh/output/host/libexec/gcc/m68k-buildroot-linux-uclibc/13.2.0/liblto_plugin.so -plugin-opt=/home/browa22-ext/openssh/output/host/libexec/gcc/m68k-buildroot-linux-uclibc/13.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp/cclgUbWV.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot --eh-frame-hdr -m m68kelf -dynamic-linker /lib/ld-uClibc.so.0 /home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/crt1.o /home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/crti.o /home/browa22-ext/openssh/output/host/lib/gcc/m68k-buildroot-linux-uclibc/13.2.0/crtbegin.o -L/home/browa22-ext/openssh/output/host/lib/gcc/m68k-buildroot-linux-uclibc/13.2.0 -L/home/browa22-ext/openssh/output/host/lib/gcc/m68k-buildroot-linux-uclibc/13.2.0/../../../../m68k-buildroot-linux-uclibc/lib -L/home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot/lib -L/home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib -z relro -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /home/browa22-ext/openssh/output/host/lib/gcc/m68k-buildroot-linux-uclibc/13.2.0/crtend.o /home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/crtn.o /home/browa22-ext/openssh/output/host/lib/gcc/m68k-buildroot-linux-uclibc/13.2.0/../../../../m68k-buildroot-linux-uclibc/bin/ld: /home/browa22-ext/openssh/output/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/crt1.o: in function `_start': (.text+0x1c): undefined reference to `main' collect2: error: ld returned 1 exit status