public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/7798: unable to find a register to spill in class `FLOAT_REGS'
@ 2002-09-01 9:46 j_r_fonseca
0 siblings, 0 replies; 3+ messages in thread
From: j_r_fonseca @ 2002-09-01 9:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 7798
>Category: target
>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 Sep 01 09:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 3.2
>Organization:
>Environment:
>Description:
gcc fails to compile a floating point function, complaining that is "unable to find a register to spill in class `FLOAT_REGS'"
>How-To-Repeat:
Save the text below as 'test.c'
typedef struct {
float x, y;
} Vector;
int circle_intersect( Vector m, int r, Vector pos, Vector v, Vector *t1, Vector *t2 )
{
Vector delta = { pos.x - m.x, pos.y - m.y };
float delta_v = delta.x * v.x + delta.y * v.y;
float dis = delta_v * delta_v + r * r - ( delta.x * delta.x + delta.y * delta.y );
float t;
if ( dis < 0 ) {
return 0;
}
dis = sqrt( dis );
t = -delta_v + dis;
t1->x = pos.x + t * v.x; t1->y = pos.y + t * v.y;
t = -delta_v - dis;
t2->x = pos.x + t * v.x; t2->y = pos.y + t * v.y;
return 1;
}
and compile it as
gcc -march=pentium3 -O3 -Wall -c test.c
and gcc will produce
test.c: In function `circle_intersect':
test.c:15: warning: implicit declaration of function `sqrt'
test.c:22: unable to find a register to spill in class `FLOAT_REGS'
test.c:22: this is the insn:
(insn 23 21 24 (set (subreg:SF (reg/v:DI 29 rmm0 [65]) 0)
(minus:SF (subreg:SF (reg/v:DI 61) 0)
(subreg:SF (reg/v:DI 0 rax [59]) 0))) 533 {*fop_sf_1_nosse} (insn_list 8 (insn_list 4 (nil)))
(nil))
test.c:22: confused by earlier errors, bailing out
>Fix:
invoking the compiler without the '-march=pentium3' or '-O3' option avoids the bug
>Release-Note:
>Audit-Trail:
>Unformatted:
Environment:
System: Linux localhost 2.4.19-gentoo-r7 #2 Wed Aug 28 12:19:51 WEST 2002 i686 GenuineIntel
Architecture: i686
Toshiba Satellite 1700-500
Gentoo Linux 1.4beta
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /var/tmp/portage/gcc-3.2-r1/work/gcc-3.2/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable- languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/include/g++-v32 --with- local-prefix=/usr/local --enable-shared --disable-nls
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: target/7798: unable to find a register to spill in class `FLOAT_REGS'
@ 2002-09-02 5:05 paolo
0 siblings, 0 replies; 3+ messages in thread
From: paolo @ 2002-09-02 5:05 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, j_r_fonseca, nobody
Synopsis: unable to find a register to spill in class `FLOAT_REGS'
State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Mon Sep 2 05:05:57 2002
State-Changed-Why:
Duplicate of PR opt/7426.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7798
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: target/7798: unable to find a register to spill in class `FLOAT_REGS'
@ 2002-09-02 1:46 Gwenole Beauchesne
0 siblings, 0 replies; 3+ messages in thread
From: Gwenole Beauchesne @ 2002-09-02 1:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR target/7798; it has been noted by GNATS.
From: Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
To: j_r_fonseca@yahoo.co.uk
Cc: gcc-gnats@gcc.gnu.org, <gcc-prs@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>,
<paolo@gcc.gnu.org>
Subject: Re: target/7798: unable to find a register to spill in class
`FLOAT_REGS'
Date: Mon, 2 Sep 2002 10:37:05 +0200 (CEST)
On Sun, 1 Sep 2002 j_r_fonseca@yahoo.co.uk wrote:
> >Number: 7798
> >Category: target
> >Synopsis: unable to find a register to spill in class `FLOAT_REGS'
Duplicate of PR opt/7426, but I can't mark this so. The same testcase was
extracted from chromium.
Bye,
Gwenole.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-02 12:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-01 9:46 target/7798: unable to find a register to spill in class `FLOAT_REGS' j_r_fonseca
2002-09-02 1:46 Gwenole Beauchesne
2002-09-02 5:05 paolo
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).