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

            Bug ID: 116058
           Summary: [15 Regression] sh4-linux-gnu fails to bootstrap, late
                    combine issue
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: law at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58743
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58743&action=edit
testcase

sh4-linux-gnu fails to bootstrap due to an ICE that appears to be a
late-combine issue, or possibly a backend bug that's tickled by late-combine.

Compile the attached (partially reduced) testcase with -O2 with a sh4-linux-gnu
cross compiler, resulting in:

j.C: In function ‘bool gimple_simplify_258(gimple_match_op*, gimple**,
tree_node* (*)(tree), tree, tree_node**, combined_fn, tree_code)’:
j.C:1010:1: internal compiler error: in add_clobbers, at config/sh/sync.md:2683
 1010 | }
      | ^
0x1f082de internal_error(char const*, ...)
        /home/jlaw/test/gcc/gcc/diagnostic-global-context.cc:491
0x967c4b fancy_abort(char const*, int, char const*)
        /home/jlaw/test/gcc/gcc/diagnostic.cc:1725
0x9216b7 add_clobbers(rtx_def*, int)
        /home/jlaw/test/gcc/gcc/config/sh/sync.md:2683
0x1df4687 recog_level2
        /home/jlaw/test/gcc/gcc/rtl-ssa/changes.cc:1043
0x1df6323 rtl_ssa::recog_internal(rtl_ssa::insn_change&, std::function<bool
(rtl_ssa::insn_change&, unsigned int)>)
        /home/jlaw/test/gcc/gcc/rtl-ssa/changes.cc:1182
0x1da4bb9 recog<(anonymous
namespace)::insn_combination::substitute_nondebug_use(rtl_ssa::use_info*)::local_ignore>
        /home/jlaw/test/gcc/gcc/rtl-ssa/change-utils.h:107
0x1da4bb9 substitute_nondebug_use
        /home/jlaw/test/gcc/gcc/late-combine.cc:256
0x1da4bb9 substitute_nondebug_uses
        /home/jlaw/test/gcc/gcc/late-combine.cc:270
0x1da566d run
        /home/jlaw/test/gcc/gcc/late-combine.cc:439
0x1da566d combine_into_uses
        /home/jlaw/test/gcc/gcc/late-combine.cc:683
0x1da5e0d execute
        /home/jlaw/test/gcc/gcc/late-combine.cc:711
0x1da5e0d execute
        /home/jlaw/test/gcc/gcc/late-combine.cc:760

Reply via email to