https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106004
Bug ID: 106004 Summary: [13 Regression] ICE: RTL check: expected elt 0 type 'i' or 'n', have 'w' (rtx const_int) in arm_print_operand, at config/arm/arm.cc:24202 Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: build, ice-checking, ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: armv7a-hardfloat-linux-gnueabi Created attachment 53153 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53153&action=edit reduced testcase (from sanitizer_deadlock_detector1.cpp) This currently breaks build with RTL checking enabled. Compiler output: $ /repo/build-gcc-trunk-armv7a-hardfloat/./gcc/cc1plus -O -march=armv7-a+vfpv4 testcase.C bool DeadlockDetector::nodeBelongsToCurrentEpoch() void MutexEnsureID() Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> {heap 1176k} <visibility> {heap 1176k} <build_ssa_passes> {heap 1176k} <opt_local_passes> {heap 1460k} <remove_symbols> {heap 2124k} <targetclone> {heap 2124k} <free-fnsummary> {heap 2124k}Streaming LTO <whole-program> {heap 2124k} <profile_estimate> {heap 2124k} <fnsummary> {heap 2124k} <inline> {heap 2124k} <pure-const> {heap 2124k} <modref> {heap 2124k} <free-fnsummary> {heap 2124k} <static-var> {heap 2124k} <single-use> {heap 2124k} <comdats> {heap 2124k}Assembling functions: void MutexEnsureID()during RTL pass: final testcase.C: In function 'void MutexEnsureID()': testcase.C:19:1: internal compiler error: RTL check: expected elt 0 type 'i' or 'n', have 'w' (rtx const_int) in arm_print_operand, at config/arm/arm.cc:24202 19 | } | ^ 0x804c80 rtl_check_failed_type2(rtx_def const*, int, int, int, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl.cc:907 0x8ccae3 arm_print_operand /repo/gcc-trunk/gcc/config/arm/arm.cc:24202 0xfbbc31 output_operand(rtx_def*, int) /repo/gcc-trunk/gcc/final.cc:3677 0xfbca83 output_asm_insn(char const*, rtx_def**) /repo/gcc-trunk/gcc/final.cc:3570 0xfc28fc output_asm_insn(char const*, rtx_def**) /repo/gcc-trunk/gcc/final.cc:3466 0xfc28fc final_scan_insn_1 /repo/gcc-trunk/gcc/final.cc:2894 0xfc2d0b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) /repo/gcc-trunk/gcc/final.cc:2940 0xfc2e04 final_1 /repo/gcc-trunk/gcc/final.cc:1997 0xfc3b56 rest_of_handle_final /repo/gcc-trunk/gcc/final.cc:4285 0xfc3b56 execute /repo/gcc-trunk/gcc/final.cc:4363 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. $ /repo/build-gcc-trunk-armv7a-hardfloat/./gcc/xgcc -v Using built-in specs. COLLECT_GCC=/repo/build-gcc-trunk-armv7a-hardfloat/./gcc/xgcc Target: armv7a-hardfloat-linux-gnueabi Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --with-ppl --with-isl --with-float=hard --with-fpu=vfpv4 --with-arch=armv7-a --with-sysroot=/usr/armv7a-hardfloat-linux-gnueabi --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=armv7a-hardfloat-linux-gnueabi --with-ld=/usr/bin/armv7a-hardfloat-linux-gnueabi-ld --with-as=/usr/bin/armv7a-hardfloat-linux-gnueabi-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r13-1134-20220616143736-g9642d07c35f-checking-yes-rtl-df-extra-armv7a-hardfloat Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.0.0 20220616 (experimental) (GCC)