This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
internal error asm
- To: egcs at cygnus dot com
- Subject: internal error asm
- From: Ulrich Drepper <drepper at cygnus dot com>
- Date: 23 Feb 1998 13:30:18 -0800
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
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 `------------------------