Subject: Re: SH3 cross-build problem
To: Bill Squier <groo@old-ones.com>
From: SAITOH Masanobu <masanobu@iij.ad.jp>
List: current-users
Date: 04/22/2002 11:28:44
Bill Squier said:
> /ssrc/src/usr.bin/sed/compile.c: In function `compile_flags':
> /ssrc/src/usr.bin/sed/compile.c:585: fixed or forbidden register 0 (r0) was spilled for class R0_REGS.
> /ssrc/src/usr.bin/sed/compile.c:585: This may be due to a compiler bug or to impossible asm
> /ssrc/src/usr.bin/sed/compile.c:585: statements or clauses.
> /ssrc/src/usr.bin/sed/compile.c:585: This is the instruction:
> (insn 130 660 132 (set (reg/i:SI 0 r0)
> (mem/f:SI (plus:SI (reg:SI 14 r14)
> (reg:SI 8 r8)) 0)) 122 {movsi_i} (nil)
> (expr_list:REG_DEAD (reg:SI 8 r8)
> (nil)))
> *** Error code 1
>
> Stop.
> nbmake: stopped in /ssrc/src/usr.bin/sed
> *** Error code 1
Thanks for your report. I'm now debugging. Use -O0 if you want to complie it
for the present.
The smaller code to reproduce this bug:
/usr/tools/lib/gcc-lib/shle--netbsdelf/2.95.3/cc1 -O -W -fno-argument-alias -fno-defer-pop -fno-thread-jumps -fno-peephole -fno-function-cse -fno-inline -fno-keep-static-consts -fno-reg-struct-return -fno-pcc-struct-return -fno-delayed-branch -fno-sjlj-exceptions -fno-ident -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror -nostdinc -isystem /usr/include tst.i
---- tst.i ----
void f (char **);
static char *
compile_flags(p)
char *p;
{
char wfile[128];
for (;;) {
switch (*p) {
case ';':
return (p);
case '7':
f(&p);
break;
}
}
}
---------------
----------------------------------------------------------
SAITOH Masanobu (masanobu@iij.ad.jp
msaitoh@netbsd.org)