This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
optimization/2415: ICE (regression 2.95.2->gcc3.0) when compiling fdlibm
- To: gcc-gnats at gcc dot gnu dot org
- Subject: optimization/2415: ICE (regression 2.95.2->gcc3.0) when compiling fdlibm
- From: Jan Vroonhof <jan dot vroonhof at insignia dot com>
- Date: Wed, 28 Mar 2001 17:45:49 +0100 (BST)
>Number: 2415
>Category: optimization
>Synopsis: ICE (regression 2.95.2->gcc3.0) when compiling pow from fdlibm
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Wed Mar 28 08:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Jan Vroonhof <jan.vroonhof@insignia.com>
>Release: 3.0 20010328 (prerelease)
>Organization:
Insignia Solutions
>Environment:
System: Linux bart 2.2.17 #2 Tue Mar 13 22:44:15 GMT 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../configure --prefix /local/cross/i386/gcc-3.0
>Description:
When compiling __ieee754_pow gcc 3.0 (compiled from CVS checkout,
verified with online test compiler for 20010327 snapshot)
the compiler ICE's at -O2 (previous versions produced incorrect code).
>How-To-Repeat:
I have tried stripping down the function as far as possible. The result
is inserted below. Compile with
gcc -O2 -o printpow printpow.i
and you will get
printpow.i: In function `__ieee754_pow':
printpow.i:75: Unable to find a register to spill in class `AREG'.
printpow.i:75: This is the insn:
(insn 209 79 82 (set (subreg:SI (reg/v:DF 15 st(7) [76]) 0)
(const_int 0 [0x0])) 35 {*movsi_1} (nil)
(nil))
printpow.i:75: confused by earlier errors, bailing out
The file [Note: This has been stripped down aggressively by deleting
blocks of code so might no longer make sense.]:
double __ieee754_pow(double x,
double y)
{
double z,
ax,
z_h,
z_l,
p_h,
p_l;
double y1,
t1,
t2,
r,
s,
t,
u,
v,
w;
int i,
j,
k,
yisint,
n;
int hx,
hy,
ix,
iy;
unsigned lx,
ly;
if (0)
{
}
else
{
double s2,
s_h,
s_l,
t_h,
t_l;
if (ix < 0x00100000)
{
ax *= 0;
n -= 53;
ix = (*(1+(int*)&ax));
}
n += ((ix) >> 20) - 0x3ff;
(*(int*)&s_h) = 0;
r += s_l * (s_h + s);
s2 = s_h * s_h;
t_h = 3.0 + s2 + r;
(*(int*)&t_h) = 0;
t_l = r - ((t_h - 3.0) - s2);
u = s_h * t_h;
v = s_l * t_h + t_l * s;
p_h = u + v;
(*(int*)&p_h) = 0;
p_l = v - (p_h - u);
z_h = 0;
z_l = p_h + p_l;
t = (double) n;
t1 = (((z_h + z_l)) + t);
(*(int*)&t1) = 0;
t2 = z_l - (((t1 - t)) - z_h);
}
y1 = y;
(*(int*)&y1) = 0;
p_l = (y - y1) * t1 + y * t2;
p_h = y1 * t1;
z = p_l + p_h;
return s * z;
}
>Fix:
No known fix or workaround
>Release-Note:
>Audit-Trail:
>Unformatted: