This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
optimization/7426: unable to find a register to spill in class `FLOAT_REGS'
- From: gbeauchesne at mandrakesoft dot com
- To: gcc-gnats at gcc dot gnu dot org
- Cc: jakub at redhat dot com, jh at suse dot cz
- Date: 28 Jul 2002 21:31:15 -0000
- Subject: optimization/7426: unable to find a register to spill in class `FLOAT_REGS'
- Reply-to: gbeauchesne at mandrakesoft dot com
>Number: 7426
>Category: optimization
>Synopsis: unable to find a register to spill in class `FLOAT_REGS'
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 28 14:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Gwenole Beauchesne
>Release: GNU C version 3.2 2002-07-26 (prerelease) (i686-pc-linux-gnu)
>Organization:
>Environment:
i686-mandrake-linux-gnu
>Description:
[gb@no gcc]$ ./cc1 -O -march=athlon ice.c
f
ice.c: In function `f':
ice.c:11: unable to find a register to spill in class `FLOAT_REGS'
ice.c:11: this is the insn:
(insn 18 52 23 (set (subreg:SF (reg/v:DI 29 rmm0 [59]) 0)
(minus:SF (reg:SF 8 st(0) [62])
(mem/j:SF (symbol_ref:SI ("pos")) [0 pos+0 S4 A32]))) 533 {*fop_sf_1_nosse} (insn_list 15 (nil))
(expr_list:REG_DEAD (reg:SF 8 st(0) [62])
(nil)))
ice.c:11: confused by earlier errors, bailing out
>How-To-Repeat:
Testcase extracted from <chromium>/src/EnemyAircraft_Omni.cpp (EnemyAircraft_Omni::move).
[gb@no gcc]$ cat ice.c
float lastMoveX;
float pos[2];
extern void * target;
void f()
{
float *hpos = pos;
float diff[2] = { hpos[0] - pos[0], hpos[1] - pos[1] };
lastMoveX = (0.9 * lastMoveX) + (0.1 * (0.01 * diff[0]));
}
Compile with -O -march=athlon to exhaust the bug. Likewise for any arch that has PTA_MMX flag but "pentium-mmx".
>Fix:
-march=i686 is OK.
>Release-Note:
>Audit-Trail:
>Unformatted: