This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Sep 9 change in gen_lowpart_common causes aborts


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);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]