This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: target/9929: [3.3/3.4 regression] Can't find spill register
- From: bangerth at dealii dot org
- To: gabor at mac dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 4 Mar 2003 15:22:52 -0000
- Subject: Re: target/9929: [3.3/3.4 regression] Can't find spill register
- Reply-to: bangerth at dealii dot org, gabor at mac dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Old Synopsis: ICE when compiling innocent function
New Synopsis: [3.3/3.4 regression] Can't find spill register
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Tue Mar 4 15:22:51 2003
State-Changed-Why:
Confirmed. Here's a reduced example:
---------------------------
typedef struct X {
char * ptr;
int offset;
} X_t;
X_t foo(X_t *d1, char * A0);
void bar() {
X_t l1, l2, l3;
l3 = foo(&l1, l2.ptr);
(*(X_t *)(l2.ptr + l3.offset)) = l1;
}
-----------------------------
It compiles cleanly with 3.2.2, but fails with 3.3 and
present mainline when using -O2 -fPIC:
g/x> /home/bangerth/bin/gcc-3.3-pre/bin/gcc -c -O2 -fPIC x.c
x.c: In function `bar':
x.c:12: error: unable to find a register to spill in class `GENERAL_REGS'
x.c:12: error: this is the insn:
(insn:HI 18 28 20 0 0x4014f2ec (set (mem/s:DI (plus:SI (subreg:SI (reg/v:DI 60) 0)
(subreg:SI (reg/v:DI 61) 4)) [2 S8 A32])
(reg:DI 63)) 59 {*movdi_2} (insn_list 15 (insn_list 17 (nil)))
(expr_list:REG_DEAD (reg:DI 63)
(expr_list:REG_DEAD (reg/v:DI 60)
(expr_list:REG_DEAD (reg/v:DI 61)
(nil)))))
x.c:12: confused by earlier errors, bailing out
g/x>
g/x>
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c -O2 -fPIC x.c
x.c: In function `bar':
x.c:12: error: unable to find a register to spill in class `GENERAL_REGS'
x.c:12: error: this is the insn:
(insn:HI 18 28 20 0 0x401532c0 (set (mem/s:DI (plus:SI (subreg:SI (reg/v:DI 60 [ l2 ]) 0)
(subreg:SI (reg/v:DI 61 [ l3 ]) 4)) [2 S8 A32])
(reg:DI 63 [ l1 ])) 60 {*movdi_2} (insn_list 15 (insn_list 17 (nil)))
(expr_list:REG_DEAD (reg:DI 63 [ l1 ])
(expr_list:REG_DEAD (reg/v:DI 60 [ l2 ])
(expr_list:REG_DEAD (reg/v:DI 61 [ l3 ])
(nil)))))
x.c:12: internal compiler error: in spill_failure, at reload1.c:1919
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9929