public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
@ 2013-09-26 15:48 gjl at gcc dot gnu.org
  2013-09-26 15:49 ` [Bug other/58545] " gjl at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: gjl at gcc dot gnu.org @ 2013-09-26 15:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58545

            Bug ID: 58545
           Summary: [4.7/4.8 Regression] error: unable to find a register
                    to spill in class 'POINTER_REGS'
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, ra
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gjl at gcc dot gnu.org
            Blocks: 56183
            Target: avr

== C source ==

typedef unsigned char uint8_t;
typedef unsigned int uint16_t;

extern uint8_t f1 (const uint8_t*);
extern void f2 (uint8_t*, uint8_t);

void func (uint16_t parameter, uint8_t *addr, uint8_t data)
{
   uint8_t status;

   status = f1 (addr + 8);

   addr++;

   if (*addr == parameter + 8)
      *addr = parameter;

   f2 (addr, data);
   f2 (addr + 8, status + 1);
}

== Command line ==

$ avr-gcc bug.c -S -Os -mmcu=atmega8
bug.c: In function 'func':
bug.c:20:1: error: unable to find a register to spill in class 'POINTER_REGS'
 }
 ^
bug.c:20:1: error: this is the insn:
(insn 37 15 16 2 (set (reg:QI 20 r20)
        (mem/c:QI (plus:HI (reg/f:HI 28 r28)
                (const_int 1 [0x1])) [3 S1 A8])) bug.c:15 70 {movqi_insn}
     (nil))
bug.c:20:1: internal compiler error: in spill_failure, at reload1.c:2123

bug.c:20:1: internal compiler error: Segmentation fault

== configure == 

Configured with: ../../gcc.gnu.org/trunk/configure --target=avr
--prefix=/local/gnu/install/gcc-4.8-mingw32 --host=i386-mingw32
--build=i686-linux-gnu --enable-languages=c,c++ --disable-nls --disable-shared
--with-dwarf2

== Notes ==

The compile passes with -fno-caller-saves


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

* [Bug other/58545] [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
@ 2013-09-26 15:49 ` gjl at gcc dot gnu.org
  2013-09-26 15:50 ` gjl at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: gjl at gcc dot gnu.org @ 2013-09-26 15:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58545

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Created attachment 30906
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30906&action=edit
bug.c C source code


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

* [Bug other/58545] [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
  2013-09-26 15:49 ` [Bug other/58545] " gjl at gcc dot gnu.org
@ 2013-09-26 15:50 ` gjl at gcc dot gnu.org
  2013-09-27  8:10 ` [Bug other/58545] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: gjl at gcc dot gnu.org @ 2013-09-26 15:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58545

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-09-26
      Known to work|                            |4.6.2
     Ever confirmed|0                           |1
      Known to fail|                            |4.7.2, 4.8.1


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

* [Bug other/58545] [4.7/4.8/4.9 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
  2013-09-26 15:49 ` [Bug other/58545] " gjl at gcc dot gnu.org
  2013-09-26 15:50 ` gjl at gcc dot gnu.org
@ 2013-09-27  8:10 ` rguenth at gcc dot gnu.org
  2013-10-03 15:32 ` amylaar at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-27  8:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58545

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.4
            Summary|[4.7/4.8 Regression] error: |[4.7/4.8/4.9 Regression]
                   |unable to find a register   |error: unable to find a
                   |to spill in class           |register to spill in class
                   |'POINTER_REGS'              |'POINTER_REGS'

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Assuming 4.9 doesn't work either.


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

* [Bug other/58545] [4.7/4.8/4.9 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-09-27  8:10 ` [Bug other/58545] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
@ 2013-10-03 15:32 ` amylaar at gcc dot gnu.org
  2013-10-03 15:39 ` amylaar at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: amylaar at gcc dot gnu.org @ 2013-10-03 15:32 UTC (permalink / raw)
  To: gcc-bugs

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.


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

* [Bug other/58545] [4.7/4.8/4.9 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-10-03 15:32 ` amylaar at gcc dot gnu.org
@ 2013-10-03 15:39 ` amylaar at gcc dot gnu.org
  2013-10-30 23:55 ` amylaar at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: amylaar at gcc dot gnu.org @ 2013-10-03 15:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58545

--- Comment #4 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
Created attachment 30951
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30951&action=edit
patch currently under test


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

* [Bug other/58545] [4.7/4.8/4.9 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-10-03 15:39 ` amylaar at gcc dot gnu.org
@ 2013-10-30 23:55 ` amylaar at gcc dot gnu.org
  2013-11-05 14:33 ` [Bug rtl-optimization/58545] [4.7/4.8 " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: amylaar at gcc dot gnu.org @ 2013-10-30 23:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58545

--- Comment #5 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
Author: amylaar
Date: Wed Oct 30 23:55:46 2013
New Revision: 204234

URL: http://gcc.gnu.org/viewcvs?rev=204234&root=gcc&view=rev
Log:
gcc:
        PR other/58545
        * reload1.c (update_eliminables_and_spill): New function, broken
        out of reload.
        (reload): Use it.  Check for frame size change after frame
        size alignment, and call update_eliminables_and_spill first
        if continue-ing.
gcc/testsuite:
        PR other/58545
        * gcc.target/avr/pr58545.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/avr/pr58545.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/reload1.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/58545] [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2013-10-30 23:55 ` amylaar at gcc dot gnu.org
@ 2013-11-05 14:33 ` rguenth at gcc dot gnu.org
  2014-02-17 16:41 ` gjl at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-05 14:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58545

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|other                       |rtl-optimization
      Known to work|                            |4.9.0
            Summary|[4.7/4.8/4.9 Regression]    |[4.7/4.8 Regression] error:
                   |error: unable to find a     |unable to find a register
                   |register to spill in class  |to spill in class
                   |'POINTER_REGS'              |'POINTER_REGS'

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
I assume fixed on trunk.


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

* [Bug rtl-optimization/58545] [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2013-11-05 14:33 ` [Bug rtl-optimization/58545] [4.7/4.8 " rguenth at gcc dot gnu.org
@ 2014-02-17 16:41 ` gjl at gcc dot gnu.org
  2014-06-12 13:42 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ 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=58545

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sebastian.huber@embedded-br
                   |                            |ains.de

--- Comment #7 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
*** Bug 60040 has been marked as a duplicate of this bug. ***


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

* [Bug rtl-optimization/58545] [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2014-02-17 16:41 ` gjl at gcc dot gnu.org
@ 2014-06-12 13:42 ` rguenth at gcc dot gnu.org
  2014-12-10 12:47 ` [Bug rtl-optimization/58545] [4.8 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.4                       |4.8.4

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
The 4.7 branch is being closed, moving target milestone to 4.8.4.


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

* [Bug rtl-optimization/58545] [4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2014-06-12 13:42 ` rguenth at gcc dot gnu.org
@ 2014-12-10 12:47 ` rguenth at gcc dot gnu.org
  2014-12-19 13:24 ` jakub at gcc dot gnu.org
  2015-06-23  8:42 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-10 12:47 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4


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

* [Bug rtl-optimization/58545] [4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2014-12-10 12:47 ` [Bug rtl-optimization/58545] [4.8 " rguenth at gcc dot gnu.org
@ 2014-12-19 13:24 ` jakub at gcc dot gnu.org
  2015-06-23  8:42 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:24 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.5

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.


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

* [Bug rtl-optimization/58545] [4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS'
  2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2014-12-19 13:24 ` jakub at gcc dot gnu.org
@ 2015-06-23  8:42 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23  8:42 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|4.8.5                       |4.9.0
      Known to fail|                            |4.8.5

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for 4.9.0.


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

end of thread, other threads:[~2015-06-23  8:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-26 15:48 [Bug other/58545] New: [4.7/4.8 Regression] error: unable to find a register to spill in class 'POINTER_REGS' gjl at gcc dot gnu.org
2013-09-26 15:49 ` [Bug other/58545] " gjl at gcc dot gnu.org
2013-09-26 15:50 ` gjl at gcc dot gnu.org
2013-09-27  8:10 ` [Bug other/58545] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
2013-10-03 15:32 ` amylaar at gcc dot gnu.org
2013-10-03 15:39 ` amylaar at gcc dot gnu.org
2013-10-30 23:55 ` amylaar at gcc dot gnu.org
2013-11-05 14:33 ` [Bug rtl-optimization/58545] [4.7/4.8 " rguenth at gcc dot gnu.org
2014-02-17 16:41 ` gjl at gcc dot gnu.org
2014-06-12 13:42 ` rguenth at gcc dot gnu.org
2014-12-10 12:47 ` [Bug rtl-optimization/58545] [4.8 " rguenth at gcc dot gnu.org
2014-12-19 13:24 ` jakub at gcc dot gnu.org
2015-06-23  8:42 ` rguenth 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).