Eric Blake wrote: > When compiling natively on mingw: > ... > checking where to find the exponent in a 'long double'... word 2 bit 0 > checking where to find the exponent in a 'long double'... (cached) word 2 bit > 0 > > and the resulting rpl_isnanl works. > > But when cross-compiling: > ... > checking where to find the exponent in a 'long double'... unknown > checking where to find the exponent in a 'long double'... unknown > > And the resulting rpl_isnanl fails on: > > { /* Pseudo-Denormal. */ > static memory_long_double x = > { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; > ASSERT (isnanl (x.value)); > } > > because gcc 3.4.4 emitted code for (x == x) that returns true for pseudo- > denormal long doubles.
Ack. It's a bug in the isnanl module. > I'm not sure how to fix this, but it seems like rpl_isnanl needs to check for > invalid x86 long double bit patterns before falling back to ==. Either this, or ensure that the "checking where to find the exponent" tests return the bit positions instead of "unknown". But I don't see how to implement either of these two possible fixes for a cross-compiler, in a way that works also for other platforms than mingw. Any ideas? Bruno