https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105792
Bug ID: 105792 Summary: SPARC GCC 12.1.0 fails with internal compiler error: in expand_expr_real_2, at expr.cc:10160 Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sumbera at volny dot cz Target Milestone: --- GDB and Qt5 fails with the same internal error when building with GCC 12.1.0 on Solaris SPARC. GCC 11 works wiyhout problem. Following is GDB error output: gmake[3]: Entering directory '/scratch/psumbera/userland-test/components/gdb/build/sparcv9/readline/readline' rm -f rltty.o /usr/gcc/12/bin/gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I/scratch/psumbera/userland-test/components/gdb/gdb-10.2/readline/readline -DRL_LIBRARY_VERSION='"8.0"' -m64 -Wall -Wno-long-long -Wcast-align -fno-omit-frame-pointer -O2 -mcpu=ultrasparc3 -mtune=niagara4 -mno-unaligned-doubles -mapp-regs -mhard-float /scratch/psumbera/userland-test/components/gdb/gdb-10.2/readline/readline/rltty.c during RTL pass: expand In function 'save_tty_chars', inlined from 'rl_prep_terminal' at /scratch/psumbera/userland-test/components/gdb/gdb-10.2/readline/readline/rltty.c:638:3: /scratch/psumbera/userland-test/components/gdb/gdb-10.2/readline/readline/rltty.c:370:52: internal compiler error: in expand_expr_real_2, at expr.cc:10160 370 | _rl_intr_char = _rl_tty_chars.t_intr = tiop->c_cc[VINTR]; | ~~~~~~~~~~^~~~~~~ 0x1007f0ff3 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) /builds/psumbera/userland-gcc-12.1.0/components/gcc12/gcc-12.1.0/gcc/expr.cc:10160 0x10069f793 expand_gimple_stmt_1 /builds/psumbera/userland-gcc-12.1.0/components/gcc12/gcc-12.1.0/gcc/cfgexpand.cc:3972 0x10069f793 expand_gimple_stmt /builds/psumbera/userland-gcc-12.1.0/components/gcc12/gcc-12.1.0/gcc/cfgexpand.cc:4033 0x1006a5313 expand_gimple_basic_block /builds/psumbera/userland-gcc-12.1.0/components/gcc12/gcc-12.1.0/gcc/cfgexpand.cc:6080 0x1006a71a7 execute /builds/psumbera/userland-gcc-12.1.0/components/gcc12/gcc-12.1.0/gcc/cfgexpand.cc:6806 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. gmake[3]: *** [Makefile:105: rltty.o] Error 1 gmake[3]: Leaving directory '/scratch/psumbera/userland-test/components/gdb/build/sparcv9/readline/readline' -- Lowering optimization level to -O1 or -O0 helps (-O3 doesn't help). Also when '-mcpu=ultrasparc3' isn't included it helps.