This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/58545] [4.7/4.8/4.9 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
- From: "amylaar at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 Oct 2013 15:32:05 +0000
- Subject: [Bug other/58545] [4.7/4.8/4.9 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
- Auto-submitted: auto-generated
- References: <bug-58545-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58545
Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amylaar at gcc dot gnu.org
--- Comment #3 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
Instruction 37 is generated by save_call_clobbered_regs.
When the eliminable registers were initialized, the frame size was
zero, and the frame pointer could be eliminated.
The frame size grew when the save area for r20 was allocated, but
reload does not update the eliminable registers in this case.
Therefore, the frame pointer r28 was eliminated to the stack pointer
in insn 37. Thus, finding reloads and spilling finished with
insn 37 using the stack pointer and needing a POINTER_REGS reload.
Then, before it comes to selecting the reload registers, the eliminables
are updated, but not the reloads that depend on them. Thus, we
try - unnecessarily - to reload the frame pointer, and can't because
r28 is in use as the frame pointer.