[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 Senthil Kumar Selvaraj changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |7.0 --- Comment #13 from Senthil Kumar Selvaraj --- Fixed in trunk (7.0)
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 --- Comment #12 from Bernd Schmidt --- Author: bernds Date: Fri Apr 29 08:59:09 2016 New Revision: 235625 URL: https://gcc.gnu.org/viewcvs?rev=235625=gcc=rev Log: avr-related reload fix from Senthil Kumar Selvaraj PR target/60040 * reload1.c (reload): Call finish_spills before restarting reload loop. Skip select_reload_regs if update_eliminables_and_spill returns true. testsuite/ PR target/60040 * gcc.target/avr/pr60040-1.c: New. * gcc.target/avr/pr60040-2.c: New. Added: trunk/gcc/testsuite/gcc.target/avr/pr60040-1.c trunk/gcc/testsuite/gcc.target/avr/pr60040-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/reload1.c trunk/gcc/testsuite/ChangeLog
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 Ambroz Bizjak changed: What|Removed |Added CC||ambrop7 at gmail dot com --- Comment #10 from Ambroz Bizjak --- I've been getting this error on some complex code of mine (for atmga2560). I tried the attached patch on gcc 5.3. While it resolves the original compile error, I then get an error from the linker, an undefined reference to the same function that the original error was related to. So I think something is wrong with the patch.
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 --- Comment #11 from Ambroz Bizjak --- Created attachment 37320 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37320=edit Modified patch which clears failure I made a wild guess that the issue is that the "failure" is not cleared, so I modified the patch (by hand), to clear "failure" after an ignored failure. With this my code compiles and links.
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 --- Comment #9 from Matthijs Kooijman --- Created attachment 36499 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36499=edit Second testcase, needs -Os to break
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 Matthijs Kooijman changed: What|Removed |Added CC||matthijs at stdin dot nl --- Comment #8 from Matthijs Kooijman --- Seems not - just tried with avr-gcc 5.1 and it is still broken: $ avr-gcc -fpreprocessed -w -mmcu=atmega128 -O2 -s test.i -o /dev/null test.i: In function 'rtems_fdisk_recycle_segment': test.i:107:1: error: unable to find a register to spill in class 'POINTER_REGS' } ^ test.i:107:1: error: this is the insn: (insn 30 29 31 2 (set (reg:HI 26 r26) (reg/v/f:HI 51 [ dpd ])) /home/matthijs/test.i:95 83 {*movhi} (nil)) test.i:107: confused by earlier errors, bailing out $ avr-gcc --version avr-gcc (GCC) 5.1.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. On the Arduino bugtracker [1], another testcase with the same symptoms was reported. I'm attaching that here. This testcase works with -O2, but breaks when -Os is used. $ avr-gcc -c -Os -mmcu=atmega328p test2.c -o /dev/null test2.c: In function 'getSlope': test2.c:22:1: error: unable to find a register to spill in class 'POINTER_REGS' } ^ test2.c:22:1: error: this is the insn: (insn 40 38 42 3 (set (reg:SF 63 [ D.1613 ]) (mem:SF (post_inc:HI (reg:HI 16 r16 [orig:73 ivtmp.13 ] [73])) [1 MEM[base: _27, offset: 0B]+0 S4 A8])) /home/matthijs/test.c:15 100 {*movsf} (expr_list:REG_INC (reg:HI 16 r16 [orig:73 ivtmp.13 ] [73]) (nil))) test2.c:22: confused by earlier errors, bailing out [1]: https://github.com/arduino/Arduino/issues/3972
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 Joel Sherrill joel at gcc dot gnu.org changed: What|Removed |Added CC||joel at gcc dot gnu.org --- Comment #7 from Joel Sherrill joel at gcc dot gnu.org --- Was the proposed patch ever committed so this can be closed?
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 --- Comment #6 from Sebastian Huber sebastian.hu...@embedded-brains.de --- GCC 4.9.0 20140407 with the proposed patch fixes the problem for me.
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 Jorn Wolfgang Rennecke amylaar at gcc dot gnu.org changed: What|Removed |Added CC||amylaar at gcc dot gnu.org --- Comment #5 from Jorn Wolfgang Rennecke amylaar at gcc dot gnu.org --- Created attachment 32372 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32372action=edit tentative patch for tentative reloads In this case, reload already knows that it has to re-do the reloads, but it goes ahead anyway and computes reloads registers for this iteration. Unfortunately, when find_reload_regs fails, it then calls spill_failure, giving a hard error for a reload that we don't need in the first place. The patch in this attachment passes down something_changed from reload as tentative to select_reload_regs and then on to find_reload_regs to not worry about the failure. Also, in reload, I made it not 'goto failure' in that case.
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 --- Comment #3 from Sebastian Huber sebastian.hu...@embedded-brains.de --- With avr-rtems4.11-gcc (GCC) 4.9.0 20140218 (experimental) I still get the error: avr-rtems4.11-gcc -fpreprocessed -w -mmcu=atmega128 -O2 -s test.i -o /dev/null test.i: In function 'rtems_fdisk_recycle_segment': test.i:107:1: error: unable to find a register to spill in class 'POINTER_REGS' } ^ test.i:107:1: error: this is the insn: (insn 30 29 31 2 (set (reg:HI 26 r26) (reg/v/f:HI 51 [ dpd ])) test.i:95 82 {*movhi} (nil)) test.i:107:1: internal compiler error: in spill_failure, at reload1.c:2106 0x825135 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /home/sh/archive/gcc-git/gcc/rtl-error.c:109 0x81a888 spill_failure /home/sh/archive/gcc-git/gcc/reload1.c:2106 0x81a888 find_reload_regs /home/sh/archive/gcc-git/gcc/reload1.c:2032 0x8230a7 select_reload_regs /home/sh/archive/gcc-git/gcc/reload1.c:2052 0x8230a7 reload(rtx_def*, int) /home/sh/archive/gcc-git/gcc/reload1.c:973 0x72c04d do_reload /home/sh/archive/gcc-git/gcc/ira.c:5469 0x72c04d rest_of_handle_reload /home/sh/archive/gcc-git/gcc/ira.c:5598 0x72c04d execute /home/sh/archive/gcc-git/gcc/ira.c:5627 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See http://gcc.gnu.org/bugs.html for instructions. The output is different though.
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|RESOLVED|NEW Last reconfirmed||2014-02-18 Resolution|DUPLICATE |--- Ever confirmed|0 |1
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Known to fail||4.8.3, 4.9.0 --- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org --- Confirmed on current 4.9 trunk from 2014-02-18 (SVN 207837).
[Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 Georg-Johann Lay gjl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org --- Seems like PR58545 *** This bug has been marked as a duplicate of bug 58545 ***