This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Sep 9 change in gen_lowpart_common causes aborts
- To: egcs at cygnus dot com
- Subject: Sep 9 change in gen_lowpart_common causes aborts
- From: Bernd Schmidt <crux at Pool dot Informatik dot RWTH-Aachen dot DE>
- Date: Wed, 30 Sep 1998 16:02:39 +0200 (MET DST)
- cc: egcs-bugs at cygnus dot com, moshier at world dot std dot com
The following change
Wed Sep 9 23:31:36 1998 (Stephen L Moshier) <moshier@world.std.com>
* emit-rtl.c (gen_lowpart_common): Disable optimization of
initialized float-int union if the value is a NaN.
causes current egcs snapshots to abort when trying to compile the
math tests in glibc-2.0.96 (on i586-linux). Below is a small test
program that demonstrates the problem. Basically, reload encounters
a SUBREG:SF of a SImode pseudo that is equivalent to a CONST_INT and
aborts in find_reloads_toplev because gen_lowpart doesn't handle it
anymore.
I can't really say what a correct fix would be, since I don't know
why the above change was necessary.
Bernd
static void
foo (float a)
{
}
int sum;
void
bar ()
{
union {
unsigned __l __attribute__((__mode__(__SI__)));
float __d;
} x = { __l: 0x7fc00000UL };
int a,b,c,d,e,f,g,h;
foo (x.__d);
for (a = 0; a < 2; a++)
for (b = 0; b < 2; b++)
for (c = 0; c < 2; c++)
for (d = 0; d < 2; d++)
for (e = 0; e < 2; e++)
for (f = 0; f < 2; f++)
for (g = 0; g < 2; g++)
for (h = 0; h < 2; h++)
sum++;
foo (x.__d);
}