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

            Bug ID: 116325
           Summary: [lra] error: unable to generate reloads for:
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gjl at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58897
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58897&action=edit
pr60040-2.c: GNU-C99 test case from gcc.target/avr

$ avr-gcc pr60040-2.c -mlra -S -Os

/pr60040-2.c:112:1: error: unable to generate reloads for:
  112 | }
      | ^
(call_insn 44 43 45 3 (parallel [
            (set (reg:HI 24 r24)
                (call (mem:HI (reg/f:HI 79 [ ops_25(D)->blank ]) [0 *_26 S2
A8])
                    (const_int 0 [0])))
            (use (const_int 0 [0]))
        ]) "gcc.target/avr/pr60040-2.c":66:10 774 {call_value_insn}
     (expr_list:REG_DEAD (reg/f:HI 79 [ ops_25(D)->blank ])
        (expr_list:REG_DEAD (reg:SI 20 r20)
            (expr_list:REG_DEAD (reg:SI 16 r16)
                (expr_list:REG_DEAD (reg:SI 12 r12)
                    (expr_list:REG_DEAD (reg:SI 8 r8)
                        (expr_list:REG_UNUSED (reg:HI 24 r24)
                            (expr_list:REG_CALL_DECL (nil)
                                (nil))))))))
    (expr_list:HI (use (reg:HI 24 r24))
        (expr_list:SI (use (reg:SI 20 r20))
            (expr_list:SI (use (reg:SI 16 r16))
                (expr_list:SI (use (reg:SI 12 r12))
                    (expr_list:SI (use (reg:SI 8 r8))
                        (nil)))))))
during RTL pass: reload
gcc.target/avr/pr60040-2.c:112:1: internal compiler error: in
curr_insn_transform, at lra-constraints.cc:4283

The insn in an indirect call, which should use the Z register (reg:HI 30) for
the target address.

Target: avr
Configured with: ../../source/gcc-master/configure --target=avr --disable-nls
--with-dwarf2 --with-gnu-as --with-gnu-ld --disable-shared
--with-long-double=64 --enable-languages=c,c++

Reply via email to