ICE with complex float on x86

Zack Weinberg zack@rabi.columbia.edu
Fri Dec 18 18:06:00 GMT 1998


This function gets an ICE with current CVS egcs on x86.

__complex__ float
func (__complex__ float x)
{
    if (__real__ x == 0.0)
	return 1.0;
    else
	return 0.0;
}

It happens with or without optimization.  The precise error is:

s_casinf.i: In function `func':
s_casinf.i:12: fixed or forbidden register 0 (ax) was spilled for class AREG.
s_casinf.i:12: This may be due to a compiler bug or to impossible asm
s_casinf.i:12: statements or clauses.
s_casinf.i:12: This is the instruction:
(insn 17 15 18 (parallel[ 
            (set (cc0)
                (compare:CCFPEQ (reg:DF 9 %st(1))
                    (reg:DF 8 %st(0))))
            (clobber (scratch:HI))
        ] ) 32 {*cmpsf_cc_1-1} (insn_list 12 (insn_list 15 (nil)))
    (expr_list:REG_DEAD (reg:DF 9 %st(1))
        (expr_list:REG_DEAD (reg:DF 8 %st(0))
            (expr_list:REG_UNUSED (scratch:HI)
                (nil)))))
../../../egcs/gcc/toplev.c:1397: Internal compiler error in function fatal_insn

This is `gcc version egcs-2.92.29 19981217 (gcc2 ss-980609 experimental)'.

zw



More information about the Gcc-bugs mailing list