https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108914
Bug ID: 108914 Summary: during RTL pass: internal compiler error Product: gcc Version: 11.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: andreas.kanzler at outlook dot com Target Milestone: --- I noticed this bug in my current project. It occurs from GCC 10.3 or 10.4. The project compiles with GCC 9.4 and 10.2 without problems, all versions above seem to be affected. I tested 9.4, 10.2, 10.4, 11.3 and 12.1 in Linux (Ubuntu 22.04 LTS and 20.04 LTS, Native and under Windows 11/WSL) and under Cygwin64, here only GCC 10.2 and 11.3. Error Message from Cygwin, the error occurs during linking: during RTL pass: ira /cygdrive/e/RC-Dev/inav/src/main/fc/fc_core.c: In function ‘getAxisRcCommand’: /cygdrive/e/RC-Dev/inav/src/main/fc/fc_core.c:170:1: internal compiler error: Segmentation fault 170 | } | ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. lto-wrapper: fatal error: /usr/bin/gcc returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-cygw Output from cmake, here from cygwin, but its similar in Linux/WSL Using built-in specs. COLLECT_GCC=/usr/bin/gcc Target: x86_64-pc-cygwin Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.3.0/configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.3.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=c,c++,fortran,lto,objc,obj-c++,jit --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.3.0 (GCC) COLLECT_GCC_OPTIONS='-D' 'FC_VERSION_MAJOR=6' '-D' 'FC_VERSION_MINOR=0' '-D' 'FC_VERSION_PATCH_LEVEL=0' '-D' 'HSE_VALUE=8000000' '-D' 'SITL' '-D' 'SITL_BUILD' '-D' '__FORKNAME__=inav' '-D' '__REVISION__="1af0e611"' '-D' '__TARGET__="SITL"' '-I' '/cygdrive/e/RC-Dev/inav/src/main/target/SITL' '-I' '/cygdrive/e/RC-Dev/inav/release/src/main/target/SITL/SITL' '-I' '/cygdrive/e/RC-Dev/inav/lib' '-I' '/cygdrive/e/RC-Dev/inav/src/main' '-I' '/cygdrive/e/RC-Dev/inav/lib/main/MAVLink' '-ggdb3' '-Os' '-D' 'NDEBUG' '-flto' '-fno-fat-lto-objects' '-Wformat=0' '-Wno-return-local-addr' '-fsingle-precision-constant' '-funsigned-char' '-v' '-save-temps' '-Wall' '-Wextra' '-Wdouble-promotion' '-Wstrict-prototypes' '-Werror=switch' '-std=gnu99' '-MD' '-MT' 'src/main/target/SITL/CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o' '-MF' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o.d' '-o' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/' /usr/lib/gcc/x86_64-pc-cygwin/11/cc1.exe -E -quiet -v -I /cygdrive/e/RC-Dev/inav/src/main/target/SITL -I /cygdrive/e/RC-Dev/inav/release/src/main/target/SITL/SITL -I /cygdrive/e/RC-Dev/inav/lib -I /cygdrive/e/RC-Dev/inav/src/main -I /cygdrive/e/RC-Dev/inav/lib/main/MAVLink -MD CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.d -MF CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o.d -MT src/main/target/SITL/CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o -dD -idirafter /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/../include/w32api -idirafter /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/lib/../lib/../../include/w32api -D FC_VERSION_MAJOR=6 -D FC_VERSION_MINOR=0 -D FC_VERSION_PATCH_LEVEL=0 -D HSE_VALUE=8000000 -D SITL -D SITL_BUILD -D __FORKNAME__=inav -D __REVISION__="1af0e611" -D __TARGET__="SITL" -D NDEBUG /cygdrive/e/RC-Dev/inav/src/main/telemetry/telemetry.c -mtune=generic -march=x86-64 -std=gnu99 -Wformat=0 -Wno-return-local-addr -Wall -Wextra -Wdouble-promotion -Wstrict-prototypes -Werror=switch -flto -fno-fat-lto-objects -fsingle-precision-constant -funsigned-char -ggdb3 -fworking-directory -Os -fpch-preprocess -o CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.i ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-cygwin/11/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/include" ignoring duplicate directory "/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/lib/../lib/../../include/w32api" #include "..." search starts here: #include <...> search starts here: /cygdrive/e/RC-Dev/inav/src/main/target/SITL /cygdrive/e/RC-Dev/inav/release/src/main/target/SITL/SITL /cygdrive/e/RC-Dev/inav/lib /cygdrive/e/RC-Dev/inav/src/main /cygdrive/e/RC-Dev/inav/lib/main/MAVLink /usr/lib/gcc/x86_64-pc-cygwin/11/include /usr/include /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/../include/w32api End of search list. COLLECT_GCC_OPTIONS='-D' 'FC_VERSION_MAJOR=6' '-D' 'FC_VERSION_MINOR=0' '-D' 'FC_VERSION_PATCH_LEVEL=0' '-D' 'HSE_VALUE=8000000' '-D' 'SITL' '-D' 'SITL_BUILD' '-D' '__FORKNAME__=inav' '-D' '__REVISION__="1af0e611"' '-D' '__TARGET__="SITL"' '-I' '/cygdrive/e/RC-Dev/inav/src/main/target/SITL' '-I' '/cygdrive/e/RC-Dev/inav/release/src/main/target/SITL/SITL' '-I' '/cygdrive/e/RC-Dev/inav/lib' '-I' '/cygdrive/e/RC-Dev/inav/src/main' '-I' '/cygdrive/e/RC-Dev/inav/lib/main/MAVLink' '-ggdb3' '-Os' '-D' 'NDEBUG' '-flto' '-fno-fat-lto-objects' '-Wformat=0' '-Wno-return-local-addr' '-fsingle-precision-constant' '-funsigned-char' '-v' '-save-temps' '-Wall' '-Wextra' '-Wdouble-promotion' '-Wstrict-prototypes' '-Werror=switch' '-std=gnu99' '-MD' '-MT' 'src/main/target/SITL/CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o' '-MF' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o.d' '-o' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/' /usr/lib/gcc/x86_64-pc-cygwin/11/cc1.exe -fpreprocessed CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.i -quiet -dumpdir CMakeFiles/SITL.elf.dir/__/__/telemetry/ -dumpbase telemetry.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -ggdb3 -Os -Wformat=0 -Wno-return-local-addr -Wall -Wextra -Wdouble-promotion -Wstrict-prototypes -Werror=switch -std=gnu99 -version -flto -fno-fat-lto-objects -fsingle-precision-constant -funsigned-char -o CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.s GNU C99 (GCC) version 11.3.0 (x86_64-pc-cygwin) compiled by GNU C version 11.3.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.25-GMP warning: MPFR header version 4.1.0 differs from library version 4.2.0. warning: MPC header version 1.2.1 differs from library version 1.3.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C99 (GCC) version 11.3.0 (x86_64-pc-cygwin) compiled by GNU C version 11.3.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.25-GMP warning: MPFR header version 4.1.0 differs from library version 4.2.0. warning: MPC header version 1.2.1 differs from library version 1.3.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: e610203cc0750d34e6eff5a7387a08f9 COLLECT_GCC_OPTIONS='-D' 'FC_VERSION_MAJOR=6' '-D' 'FC_VERSION_MINOR=0' '-D' 'FC_VERSION_PATCH_LEVEL=0' '-D' 'HSE_VALUE=8000000' '-D' 'SITL' '-D' 'SITL_BUILD' '-D' '__FORKNAME__=inav' '-D' '__REVISION__="1af0e611"' '-D' '__TARGET__="SITL"' '-I' '/cygdrive/e/RC-Dev/inav/src/main/target/SITL' '-I' '/cygdrive/e/RC-Dev/inav/release/src/main/target/SITL/SITL' '-I' '/cygdrive/e/RC-Dev/inav/lib' '-I' '/cygdrive/e/RC-Dev/inav/src/main' '-I' '/cygdrive/e/RC-Dev/inav/lib/main/MAVLink' '-ggdb3' '-Os' '-D' 'NDEBUG' '-flto' '-fno-fat-lto-objects' '-Wformat=0' '-Wno-return-local-addr' '-fsingle-precision-constant' '-funsigned-char' '-v' '-save-temps' '-Wall' '-Wextra' '-Wdouble-promotion' '-Wstrict-prototypes' '-Werror=switch' '-std=gnu99' '-MD' '-MT' 'src/main/target/SITL/CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o' '-MF' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o.d' '-o' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/' /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/as.exe -v -I /cygdrive/e/RC-Dev/inav/src/main/target/SITL -I /cygdrive/e/RC-Dev/inav/release/src/main/target/SITL/SITL -I /cygdrive/e/RC-Dev/inav/lib -I /cygdrive/e/RC-Dev/inav/src/main -I /cygdrive/e/RC-Dev/inav/lib/main/MAVLink --gdwarf-5 -o CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.s GNU assembler version 2.40 (x86_64-pc-cygwin) using BFD version (GNU Binutils) 2.40 COMPILER_PATH=/usr/lib/gcc/x86_64-pc-cygwin/11/:/usr/lib/gcc/x86_64-pc-cygwin/11/:/usr/lib/gcc/x86_64-pc-cygwin/:/usr/lib/gcc/x86_64-pc-cygwin/11/:/usr/lib/gcc/x86_64-pc-cygwin/:/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-cygwin/11/:/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/lib/../lib/:/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/lib/:/usr/lib/gcc/x86_64-pc-cygwin/11/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-D' 'FC_VERSION_MAJOR=6' '-D' 'FC_VERSION_MINOR=0' '-D' 'FC_VERSION_PATCH_LEVEL=0' '-D' 'HSE_VALUE=8000000' '-D' 'SITL' '-D' 'SITL_BUILD' '-D' '__FORKNAME__=inav' '-D' '__REVISION__="1af0e611"' '-D' '__TARGET__="SITL"' '-I' '/cygdrive/e/RC-Dev/inav/src/main/target/SITL' '-I' '/cygdrive/e/RC-Dev/inav/release/src/main/target/SITL/SITL' '-I' '/cygdrive/e/RC-Dev/inav/lib' '-I' '/cygdrive/e/RC-Dev/inav/src/main' '-I' '/cygdrive/e/RC-Dev/inav/lib/main/MAVLink' '-ggdb3' '-Os' '-D' 'NDEBUG' '-flto' '-fno-fat-lto-objects' '-Wformat=0' '-Wno-return-local-addr' '-fsingle-precision-constant' '-funsigned-char' '-v' '-save-temps' '-Wall' '-Wextra' '-Wdouble-promotion' '-Wstrict-prototypes' '-Werror=switch' '-std=gnu99' '-MD' '-MT' 'src/main/target/SITL/CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o' '-MF' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o.d' '-o' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/SITL.elf.dir/__/__/telemetry/telemetry.c.'