Created attachment 58897 [details] 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++
Created attachment 58945 [details] 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
Created attachment 58958 [details] qsort.c. C test case LRA can't compile qsort.c from libc; same ICE.
(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).
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 ***