[Bug target/121882] ICE when building GCC 13 with checking and -mtune=znver5

sjames at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 10 00:11:39 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121882

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sjames at gcc dot gnu.org

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
I can repro with:
```
$ gcc-13 -c -O2 -mtune=znver5 p.c
during RTL pass: sched2
p.c: In function ‘xre_compile_fastmap’:
p.c:8:1: internal compiler error: RTL check: expected code 'reg', have
'const_int' in rhs_regno, at rtl.h:1932
    8 | }
      | ^
0x55f6c8ef268d rtl_check_failed_code1(rtx_def const*, rtx_code, char const*,
int, char const*)
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/rtl.cc:916
0x55f6c8388730 rhs_regno(rtx_def const*) [clone .part.0] [clone .lto_priv.0]
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/rtl.h:1932
0x55f6c83883a6 rhs_regno(rtx_def const*)
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/rtl.h:1931
0x55f6c9021a98 ix86_fuse_mov_alu_p
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/config/i386/x86-tune-sched.cc:587
0x55f6c893cf90 ix86_macro_fusion_pair_p(rtx_insn*, rtx_insn*)
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/config/i386/x86-tune-sched.cc:607
0x55f6c9bc0ba6 sched_macro_fuse_insns
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/sched-deps.cc:2877
0x55f6c9bc0ba6 sched_analyze_insn
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/sched-deps.cc:2916
0x55f6c9bbf1bc deps_analyze_insn(deps_desc*, rtx_insn*)
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/sched-deps.cc:3707
0x55f6c9bbc602 sched_analyze(deps_desc*, rtx_insn*, rtx_insn*)
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/sched-deps.cc:3860
0x55f6c9bbae93 compute_block_dependences
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/sched-rgn.cc:2733
0x55f6c9bbae93 sched_rgn_compute_dependencies(int)
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/sched-rgn.cc:3369
0x55f6c9bb4646 schedule_region
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/sched-rgn.cc:3134
0x55f6c9bb4646 schedule_insns()
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/sched-rgn.cc:3527
0x55f6c9bb4423 rest_of_handle_sched2
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/sched-rgn.cc:3751
0x55f6c9bb4423 execute
       
/usr/src/debug/sys-devel/gcc-13.4.1_p20250904/gcc-13-20250904/gcc/sched-rgn.cc:3890
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```


More information about the Gcc-bugs mailing list