* [Bug target/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
2014-02-03 11:13 [Bug target/60040] New: AVR: error: unable to find a register to spill in class 'POINTER_REGS' sebastian.huber@embedded-brains.de
@ 2014-02-03 11:13 ` sebastian.huber@embedded-brains.de
2014-02-17 16:41 ` [Bug other/60040] " gjl at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sebastian.huber@embedded-brains.de @ 2014-02-03 11:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040
--- Comment #1 from Sebastian Huber <sebastian.huber@embedded-brains.de> ---
Created attachment 32024
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32024&action=edit
Test case.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
2014-02-03 11:13 [Bug target/60040] New: AVR: error: unable to find a register to spill in class 'POINTER_REGS' sebastian.huber@embedded-brains.de
2014-02-03 11:13 ` [Bug target/60040] " sebastian.huber@embedded-brains.de
@ 2014-02-17 16:41 ` gjl at gcc dot gnu.org
2014-02-18 8:12 ` sebastian.huber@embedded-brains.de
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: gjl at gcc dot gnu.org @ 2014-02-17 16:41 UTC (permalink / raw)
To: gcc-bugs
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 ***
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
2014-02-03 11:13 [Bug target/60040] New: AVR: error: unable to find a register to spill in class 'POINTER_REGS' sebastian.huber@embedded-brains.de
2014-02-03 11:13 ` [Bug target/60040] " sebastian.huber@embedded-brains.de
2014-02-17 16:41 ` [Bug other/60040] " gjl at gcc dot gnu.org
@ 2014-02-18 8:12 ` sebastian.huber@embedded-brains.de
2014-02-18 10:35 ` gjl at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sebastian.huber@embedded-brains.de @ 2014-02-18 8:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040
--- Comment #3 from Sebastian Huber <sebastian.huber@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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
2014-02-03 11:13 [Bug target/60040] New: AVR: error: unable to find a register to spill in class 'POINTER_REGS' sebastian.huber@embedded-brains.de
` (2 preceding siblings ...)
2014-02-18 8:12 ` sebastian.huber@embedded-brains.de
@ 2014-02-18 10:35 ` gjl at gcc dot gnu.org
2014-02-18 10:50 ` gjl at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: gjl at gcc dot gnu.org @ 2014-02-18 10:35 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
2014-02-03 11:13 [Bug target/60040] New: AVR: error: unable to find a register to spill in class 'POINTER_REGS' sebastian.huber@embedded-brains.de
` (3 preceding siblings ...)
2014-02-18 10:35 ` gjl at gcc dot gnu.org
@ 2014-02-18 10:50 ` gjl at gcc dot gnu.org
2014-03-17 12:38 ` amylaar at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: gjl at gcc dot gnu.org @ 2014-02-18 10:50 UTC (permalink / raw)
To: gcc-bugs
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).
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
2014-02-03 11:13 [Bug target/60040] New: AVR: error: unable to find a register to spill in class 'POINTER_REGS' sebastian.huber@embedded-brains.de
` (4 preceding siblings ...)
2014-02-18 10:50 ` gjl at gcc dot gnu.org
@ 2014-03-17 12:38 ` amylaar at gcc dot gnu.org
2014-04-07 13:19 ` sebastian.huber@embedded-brains.de
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: amylaar at gcc dot gnu.org @ 2014-03-17 12:38 UTC (permalink / raw)
To: gcc-bugs
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=32372&action=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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
2014-02-03 11:13 [Bug target/60040] New: AVR: error: unable to find a register to spill in class 'POINTER_REGS' sebastian.huber@embedded-brains.de
` (5 preceding siblings ...)
2014-03-17 12:38 ` amylaar at gcc dot gnu.org
@ 2014-04-07 13:19 ` sebastian.huber@embedded-brains.de
2014-11-05 16:19 ` joel at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sebastian.huber@embedded-brains.de @ 2014-04-07 13:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040
--- Comment #6 from Sebastian Huber <sebastian.huber@embedded-brains.de> ---
GCC 4.9.0 20140407 with the proposed patch fixes the problem for me.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
2014-02-03 11:13 [Bug target/60040] New: AVR: error: unable to find a register to spill in class 'POINTER_REGS' sebastian.huber@embedded-brains.de
` (6 preceding siblings ...)
2014-04-07 13:19 ` sebastian.huber@embedded-brains.de
@ 2014-11-05 16:19 ` joel at gcc dot gnu.org
2015-10-13 12:55 ` matthijs at stdin dot nl
2015-10-13 12:56 ` matthijs at stdin dot nl
9 siblings, 0 replies; 11+ messages in thread
From: joel at gcc dot gnu.org @ 2014-11-05 16:19 UTC (permalink / raw)
To: gcc-bugs
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?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
2014-02-03 11:13 [Bug target/60040] New: AVR: error: unable to find a register to spill in class 'POINTER_REGS' sebastian.huber@embedded-brains.de
` (7 preceding siblings ...)
2014-11-05 16:19 ` joel at gcc dot gnu.org
@ 2015-10-13 12:55 ` matthijs at stdin dot nl
2015-10-13 12:56 ` matthijs at stdin dot nl
9 siblings, 0 replies; 11+ messages in thread
From: matthijs at stdin dot nl @ 2015-10-13 12:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040
Matthijs Kooijman <matthijs at stdin dot nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matthijs at stdin dot nl
--- Comment #8 from Matthijs Kooijman <matthijs at stdin dot nl> ---
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug other/60040] AVR: error: unable to find a register to spill in class 'POINTER_REGS'
2014-02-03 11:13 [Bug target/60040] New: AVR: error: unable to find a register to spill in class 'POINTER_REGS' sebastian.huber@embedded-brains.de
` (8 preceding siblings ...)
2015-10-13 12:55 ` matthijs at stdin dot nl
@ 2015-10-13 12:56 ` matthijs at stdin dot nl
9 siblings, 0 replies; 11+ messages in thread
From: matthijs at stdin dot nl @ 2015-10-13 12:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040
--- Comment #9 from Matthijs Kooijman <matthijs at stdin dot nl> ---
Created attachment 36499
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36499&action=edit
Second testcase, needs -Os to break
^ permalink raw reply [flat|nested] 11+ messages in thread