public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/116325] New: [lra] error: unable to generate reloads for:
@ 2024-08-10 11:19 gjl at gcc dot gnu.org
  2024-08-10 11:21 ` [Bug rtl-optimization/116325] " gjl at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-08-10 11:19 UTC (permalink / raw)
  To: gcc-bugs

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++

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug rtl-optimization/116325] [lra] error: unable to generate reloads for:
  2024-08-10 11:19 [Bug rtl-optimization/116325] New: [lra] error: unable to generate reloads for: gjl at gcc dot gnu.org
@ 2024-08-10 11:21 ` gjl at gcc dot gnu.org
  2024-08-17 13:31 ` gjl at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-08-10 11:21 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Target|                            |avr
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code, ra
             Blocks|                            |56183, 113932, 113934
   Last reconfirmed|                            |2024-08-10


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56183
[Bug 56183] [meta-bug][avr] Problems with register allocation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113934
[Bug 113934] Switch avr to LRA

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug rtl-optimization/116325] [lra] error: unable to generate reloads for:
  2024-08-10 11:19 [Bug rtl-optimization/116325] New: [lra] error: unable to generate reloads for: gjl at gcc dot gnu.org
  2024-08-10 11:21 ` [Bug rtl-optimization/116325] " gjl at gcc dot gnu.org
@ 2024-08-17 13:31 ` gjl at gcc dot gnu.org
  2024-08-19 15:28 ` gjl at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-08-17 13:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Created attachment 58945
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58945&action=edit
C++ test case from libstdc++v3

This is a test case from libstdc++v3.  Compile with

$ avr-g++ pr116389.cpp -S -dumpbase "" -O2 -mmcu=avrtiny -dp
-fdump-rtl-ira-details -fdump-rtl-reload-details -mlra

error: unable to generate reloads for:
(call_insn/j 43 42 44 8 (parallel [
            (set (reg:HI 24 r24)
                (call (mem:HI (reg/f:HI 45 [ _8 ]) [0
*OBJ_TYPE_REF(_8;this_1(D)->7B) S2 A8])
                    (const_int 2 [0x2])))
            (use (const_int 1 [0x1]))
        ])
"/ssd1/build/avr/gcc-bug/avr/avrtiny/libstdc++-v3/include/bits/locale_facets.h":917:23
774 {call_value_insn}
     (expr_list:REG_DEAD (reg/f:HI 45 [ _8 ])
        (expr_list:REG_DEAD (reg:QI 35 argH)
            (expr_list:REG_DEAD (reg:HI 22 r22)
                (expr_list:REG_DEAD (reg:HI 20 r20)
                    (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:HI (use (reg:HI 22 r22))
            (expr_list:HI (use (reg:HI 20 r20))
                (expr_list:HI (use (mem/f:HI (reg/f:HI 34 argL) [0  S2 A8]))
                    (nil))))))
during RTL pass: reload
dump file: pr116389.cpp.317r.reload
/ssd1/build/avr/gcc-bug/avr/avrtiny/libstdc++-v3/include/bits/locale_facets.h:918:7:
internal compiler error: in curr_insn_transform, at lra-constraints.cc:4283

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug rtl-optimization/116325] [lra] error: unable to generate reloads for:
  2024-08-10 11:19 [Bug rtl-optimization/116325] New: [lra] error: unable to generate reloads for: gjl at gcc dot gnu.org
  2024-08-10 11:21 ` [Bug rtl-optimization/116325] " gjl at gcc dot gnu.org
  2024-08-17 13:31 ` gjl at gcc dot gnu.org
@ 2024-08-19 15:28 ` gjl at gcc dot gnu.org
  2024-08-19 15:47 ` [Bug rtl-optimization/116325] [lra] ICE: in curr_insn_transform, at lra-constraints.cc:4283 gjl at gcc dot gnu.org
  2024-09-18  9:49 ` gjl at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-08-19 15:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Created attachment 58958
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58958&action=edit
qsort.c. C test case

LRA can't compile qsort.c from libc; same ICE.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug rtl-optimization/116325] [lra] ICE: in curr_insn_transform, at lra-constraints.cc:4283
  2024-08-10 11:19 [Bug rtl-optimization/116325] New: [lra] error: unable to generate reloads for: gjl at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-08-19 15:28 ` gjl at gcc dot gnu.org
@ 2024-08-19 15:47 ` gjl at gcc dot gnu.org
  2024-09-18  9:49 ` gjl at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-08-19 15:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Georg-Johann Lay from comment #2)
> Created attachment 58958 [details]
> qsort.c. C test case
> 
> LRA can't compile qsort.c from libc; same ICE.

Just compile qsort.c with -mlra (optimizatio level and -mmcu don't seem to
matter).

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug rtl-optimization/116325] [lra] ICE: in curr_insn_transform, at lra-constraints.cc:4283
  2024-08-10 11:19 [Bug rtl-optimization/116325] New: [lra] error: unable to generate reloads for: gjl at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-08-19 15:47 ` [Bug rtl-optimization/116325] [lra] ICE: in curr_insn_transform, at lra-constraints.cc:4283 gjl at gcc dot gnu.org
@ 2024-09-18  9:49 ` gjl at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-09-18  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #4 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Dup of PR116326; at least the patch to resolve PR116326 also resolves the test
cases for this PR.

*** This bug has been marked as a duplicate of bug 116326 ***

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-09-18  9:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-10 11:19 [Bug rtl-optimization/116325] New: [lra] error: unable to generate reloads for: gjl at gcc dot gnu.org
2024-08-10 11:21 ` [Bug rtl-optimization/116325] " gjl at gcc dot gnu.org
2024-08-17 13:31 ` gjl at gcc dot gnu.org
2024-08-19 15:28 ` gjl at gcc dot gnu.org
2024-08-19 15:47 ` [Bug rtl-optimization/116325] [lra] ICE: in curr_insn_transform, at lra-constraints.cc:4283 gjl at gcc dot gnu.org
2024-09-18  9:49 ` gjl at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).