Bug 7426 - unable to find a register to spill in class `FLOAT_REGS'
Summary: unable to find a register to spill in class `FLOAT_REGS'
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 7798 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-28 14:36 UTC by Gwenole Beauchesne
Modified: 2003-07-25 17:33 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gwenole Beauchesne 2002-07-28 14:36:00 UTC
[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

Release:
GNU C version 3.2 2002-07-26 (prerelease) (i686-pc-linux-gnu)

Environment:
i686-mandrake-linux-gnu

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".
Comment 1 Gwenole Beauchesne 2002-07-28 14:36:00 UTC
Fix:
-march=i686 is OK.
Comment 2 Gwenole Beauchesne 2002-07-29 12:05:57 UTC
From: Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
To: gcc-gnats@gcc.gnu.org
Cc: jakub@redhat.com, <jh@suse.cz>, <nobody@gcc.gnu.org>,
        <gcc-prs@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>
Subject: Re: optimization/7426: unable to find a register to spill in class
 `FLOAT_REGS'
Date: Mon, 29 Jul 2002 12:05:57 +0200 (CEST)

 On 28 Jul 2002 gbeauchesne@mandrakesoft.com wrote:
 
 > Compile with -O -march=athlon to exhaust the bug. Likewise for any arch
 > that has PTA_MMX flag but "pentium-mmx".
 
 Further notes: this is a regression from:
 GNU C version 3.0.5 20020502 (prerelease) (i686-pc-linux-gnu)
 
Comment 3 Paolo Carlini 2002-07-29 13:16:00 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed as a regression from 3.0.4 -> high priority
Comment 4 Nathanael C. Nerode 2002-10-22 19:01:24 UTC
From: Nathanael Nerode <neroden@twcny.rr.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, jakub@redhat.com, jh@suse.cz,
   gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gbeauchesne@mandrakesoft.com
Cc:  
Subject: Re: optimization/7426: unable to find a register to spill in class
 `FLOAT_REGS'
Date: Tue, 22 Oct 2002 19:01:24 -0400

 This appears to be fixed.  Can the reporter confirm that it's fixed, or 
 that it's still a problem, with current mainline or current 3.2 branch?
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7426
 
Comment 5 Joe Buck 2002-10-23 15:05:31 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Verified as no longer present on trunk or 3.2 branch as of
    23-oct-2002.