From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulrich Drepper To: egcs@cygnus.com Subject: internal error asm Date: Mon, 23 Feb 1998 15:08:00 -0000 Message-id: X-SW-Source: 1998-02/msg01084.html Hi, the following little piece of code crashed all gcc versions on ix86 which I could test: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include 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 `------------------------