long double trouble w/ ix86

Ulrich Drepper drepper@cygnus.com
Sun Apr 19 17:51:00 GMT 1998


Hi,

egcs as of this morning (1998-04-19) still cannot compile glibc.  The
following small file crashes gcc:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extern int __finitel (long double __value) __attribute__ ((__const__));
extern long double __scalbnl (long double __x, int __n);
extern int *__errno_location (void) __attribute__ ((__const__));

long double
__ldexpl(long double value, int exp)
{
	if(!__finitel(value)||value==0.0) return value;
	value = __scalbnl(value,exp);
	if(!__finitel(value)||value==0.0) (*__errno_location ()) = ( 34  ) ;
	return value;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When called as `gcc -c -O3 -fPIC s_ldexpl.i' gcc crashes after
printing this:

s_ldexpl.i: In function `__ldexpl':
s_ldexpl.i:13: Unable to find a register to spill.
(insn:QI 12 10 14 (set (mem:XF (pre_dec:SI (reg:SI 7 %esp)))
        (reg/v:XF 21)) 76 {movxf_push} (insn_list 4 (nil))
    (insn_list:REG_LIBCALL 18 (nil)))


When you leave out the -fPIC everything is fine.

-- 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-bugs mailing list