[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug optimization/14529] New: Reload decides to write into a fp constant
From: |
jakub at gcc dot gnu dot org |
Subject: |
[Bug optimization/14529] New: Reload decides to write into a fp constant, causing ICE |
Date: |
11 Mar 2004 10:51:52 -0000 |
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-options "-march=i686 -O2 -ffast-math -fPIC" { target i?86-*-* } } */
extern double foo (double x);
extern double bar (double x, double y);
extern double baz (double x) __attribute__ ((__const__));
int
test (double w, double x, double y, double z)
{
double a[7], b, c;
int i;
b = x - w * w / 3;
for (i = 0; i < 6; i++)
a[i] = -w / 3;
c = (y < 0 ? -1 : y > 0 ? 1 : 0) * bar (baz (y), 1.0 / 3) -
(y < 0 ? -1 : y > 0 ? 1 : 0) * b / 3.0 * bar (baz (y), -1.0 / 3);
if (!(y < 0.001 && y > -0.001))
a[i] =
foo (z / 3.0 +
2 * 3.1415926535897932384626433832795 * (i % 3) / 3.0) * c - w / 3;
return 3;
}
causes ICE on gcc-3_3-branch on i386 (works on gcc-3_2-branch, gcc-3_4-branch
and
trunk).
Reload changes:
(insn:HI 119 46 49 2 (nil) (set (reg:DF 72)
(reg:DF 87)) 93 {*movdf_nointeger} (nil)
(expr_list:REG_EQUIV (mem/u/f:DF (plus:SI (reg:SI 3 ebx)
(const:SI (unspec:SI [
(symbol_ref/u:SI ("*.LC0"))
] 1))) [2 S8 A64])
(nil)))
into buggy:
(insn:HI 119 46 49 2 (nil) (set (mem/u/f:DF (plus:SI (reg:SI 3 ebx)
(const:SI (unspec:SI [
(symbol_ref/u:SI ("*.LC0"))
] 1))) [2 S8 A64])
(const_double:DF
3.33333333333333314829616256247390992939472198486328125e-1
[0x0.aaaaaaaaaaaaa8p-1])) 93 {*movdf_nointeger} (nil)
(expr_list:REG_EQUIV (mem/u/f:DF (plus:SI (reg:SI 3 ebx)
(const:SI (unspec:SI [
(symbol_ref/u:SI ("*.LC0"))
] 1))) [2 S8 A64])
(nil)))
--
Summary: Reload decides to write into a fp constant, causing ICE
Product: gcc
Version: 3.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: x86_64-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14529
- [Bug optimization/14529] New: Reload decides to write into a fp constant, causing ICE,
jakub at gcc dot gnu dot org <=