egcs 1.0.2 is broken.
H.J. Lu
hjl@lucon.org
Wed Feb 11 11:52:00 GMT 1998
Hi,
On linux/x86, egcs 1.0.2 is broken.
# gcc -O f.c
# a.out
zsh: 32567 abort ./a.out
When you take a loot at the asm output, you will see the second
condition in the if expression is not evaluated at all.
BTW, egcs 980122 is ok on that.
--
H.J. Lu (hjl@gnu.org)
---f.c--
#include <stdio.h>
extern __inline int
__signbitl (long double __x)
{
union { long double __l; int __i[3]; } __u = { __l: __x };
return (__u.__i[2] & 0x8000) != 0;
}
void
foo (long double x, long double y)
{
long double z = x / y;
if (__signbitl (x) && __signbitl (z))
abort ();
}
int main()
{
foo (-0.0, -1.0);
}
More information about the Gcc
mailing list