https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115991
Bug ID: 115991 Summary: [15 Regression] ICE on linux-6.10 in ix86_print_operand_address_as() Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Noticed the ICE when was building linux-6.10 with r15-2147-g9846b0916c1a9b gcc-master: CC [M] drivers/gpu/drm/nouveau/nvkm/subdev/acr/tu102.o during RTL pass: final ../drivers/gpu/drm/nouveau/nvkm/subdev/acr/tu102.c: In function 'tu102_acr_wpr_build': ../drivers/gpu/drm/nouveau/nvkm/subdev/acr/tu102.c:85:1: internal compiler error: Segmentation fault 85 | } | ^ `cvise` came up with this example: // $ cat tu102.c.c typedef unsigned u32; int list_is_head(); void tu102_acr_wpr_build_acr_0_0_0(int, long, u32); void tu102_acr_wpr_build() { u32 offset = 0; for (; list_is_head();) { int hdr; u32 _addr = offset, _size = sizeof(hdr), *_data = &hdr; while (_size--) { tu102_acr_wpr_build_acr_0_0_0(0, _addr, *_data++); _addr += 4; } offset += sizeof(hdr); } tu102_acr_wpr_build_acr_0_0_0(0, offset, 0); } $ gcc/xgcc -Bgcc -O2 -o bug.o -c tu102.c.c during RTL pass: final tu102.c.c: In function ‘tu102_acr_wpr_build’: tu102.c.c:16:1: internal compiler error: Segmentation fault 16 | } | ^ 0x23f2c0d diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x23fc899 internal_error(char const*, ...) ???:0 0xf4a8cd crash_signal(int) ???:0 0x13d0ec3 print_reg(rtx_def*, int, _IO_FILE*) ???:0 0x13d3e9e ix86_print_operand_address_as(_IO_FILE*, rtx_def*, unsigned char, bool) ???:0 0x13d4281 ix86_print_operand_address(_IO_FILE*, machine_mode, rtx_def*) ???:0 0xad449e output_address(machine_mode, rtx_def*) ???:0 0x13d4355 ix86_print_operand(_IO_FILE*, rtx_def*, int) ???:0 0xad43ab output_operand(rtx_def*, int) ???:0 0xad4e7e output_asm_insn(char const*, rtx_def**) ???:0 0xad910e final_scan_insn_1(rtx_insn*, _IO_FILE*, int, int, int*) ???:0 0xad956d final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) ???:0 0xad9ed4 final_1(rtx_insn*, _IO_FILE*, int, int) ???:0 0xada376 (anonymous namespace)::pass_final::execute(function*) ???:0 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. $ gcc/xgcc -Bgcc -v Reading specs from gcc/specs COLLECT_GCC=gcc/xgcc COLLECT_LTO_WRAPPER=gcc/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib --disable-bootstrap --disable-lto --disable-libsanitizer --enable-languages=c CFLAGS='-O1 -g0' CXXFLAGS='-O1 -g0' LDFLAGS='-O1 -g0' Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20240718 (experimental) (GCC)