internal error asm
Ulrich Drepper
drepper@cygnus.com
Mon Feb 23 15:08:00 GMT 1998
Hi,
the following little piece of code crashed all gcc versions on ix86
which I could test:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <stdio.h>
extern double bar (double);
int
baz (double d)
{
double e = bar (d);
#ifdef BROKEN
asm volatile ("" : : : "st");
#else
asm volatile ("" : : : "memory");
#endif
return printf ("%lg\n", e);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drepper@happy drepper$ gcc -Wa,-al -c v.c -O3 -DBROKEN
gcc: Internal compiler error: program cc1 got fatal signal 11
Not defining BROKEN lets the compiler finish but the result is not the
same (I want to force `e' being written to memory before calling
printf). It's necessary to compile libm correctly.
-- Uli
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------
More information about the Gcc
mailing list