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

            Bug ID: 116389
           Summary: ICE in extract_constrain_insn for avrtiny and -O2
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dv at vollmann dot ch
  Target Milestone: ---
            Target: avr

Created attachment 58938
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58938&action=edit
Preprocessed source using -freport-bug

/ssd1/build/avr/gcc-bug/avr/avrtiny/libstdc++-v3/include/bits/locale_facets_nonio.tcc:578:7:
error: insn does not satisfy its constraints:
  578 |       }
      |       ^
(insn 180 900 181 27 (set (mem/c:SI (plus:HI (reg/f:HI 28 r28)
                (const_int 28 [0x1c])) [91 %sfp+28 S4 A8])
        (reg:SI 30 r30))
"/ssd1/build/avr/gcc-bug/avr/avrtiny/libstdc++-v3/include/bits/locale_facets_nonio.tcc":477:14
119 {*movsi_split}
     (nil))
during RTL pass: postreload
/ssd1/build/avr/gcc-bug/avr/avrtiny/libstdc++-v3/include/bits/locale_facets_nonio.tcc:578:7:
internal compiler error: in extract_constrain_insn, at recog.cc:2783
0x1cf6290 internal_error(char const*, ...)
        /ssd1/build/src/gcc/gcc/diagnostic-global-context.cc:491
0x6ea6b7 fancy_abort(char const*, int, char const*)
        /ssd1/build/src/gcc/gcc/diagnostic.cc:1772
0x59b339 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /ssd1/build/src/gcc/gcc/rtl-error.cc:108
0x59b35f _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /ssd1/build/src/gcc/gcc/rtl-error.cc:118
0x599e91 extract_constrain_insn(rtx_insn*)
        /ssd1/build/src/gcc/gcc/recog.cc:2783
0xeeb2d6 reload_cse_simplify_operands
        /ssd1/build/src/gcc/gcc/postreload.cc:396
0xeebe65 reload_cse_simplify
        /ssd1/build/src/gcc/gcc/postreload.cc:179
0xeebe65 reload_cse_regs_1
        /ssd1/build/src/gcc/gcc/postreload.cc:227
0xeedf9b reload_cse_regs
        /ssd1/build/src/gcc/gcc/postreload.cc:65
0xeedf9b execute
        /ssd1/build/src/gcc/gcc/postreload.cc:2366

This happens when trying to build libstdc++, the file is
libstdc++-v3/src/c++11/locale-inst.cc.
It only occurs for avrtiny and -O2, not for other AVR archs or other
optimization levels (Os, O1, O3 and O4 build fine).

Reply via email to