This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

mathinline problem



If I add this small patch for mathinline:
Index: sysdeps/i386/fpu/bits/mathinline.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/i386/fpu/bits/mathinline.h,v
retrieving revision 1.39
diff -u -r1.39 mathinline.h
--- mathinline.h	2000/05/06 07:46:06	1.39
+++ mathinline.h	2000/05/16 09:27:50
@@ -494,8 +494,10 @@
 __inline_mathop_declNP (log, "fldln2; fxch; fyl2x", "0" (__x) : "st(1)")
 __inline_mathop_declNP (log10, "fldlg2; fxch; fyl2x", "0" (__x) : "st(1)")
 
+#ifdef __FAST_MATH__
 __inline_mathcodeNP (asin, __x, return __atan2l (__x, __sqrtl (1.0 - __x * __x)))
 __inline_mathcodeNP (acos, __x, return __atan2l (__sqrtl (1.0 - __x * __x), __x))
+#endif
 
 __inline_mathcode_ (long double, __sgn1l, __x, \
   union { long double __xld; unsigned int __xi[3]; } __n = { __xld: __x };  \
===================================================================


I get a segementation fault when running the testsuite.  For example 
I get for test-idouble -v3:

[...]
Test: acos (0) == pi/2
Result:
 is:          1.57079632679489655800e+00   0x1.921fb54442d1800000000000000000000p+0
Segmentation fault

This happens with gcc 2.95.2 - it doesn't happen with the current gcc
2.96 CVS version.

So what's the right thing to do?  We do want to add some more
__FAST_MATH__ #ifdefs to mathinline.h but adding more leads to
segmentation faults in the testsuite (and therefore most probably also
in user space programs).

What should we do?  Require gcc 2.96 for a correct compilation?  Or
ignore fast-math for now?

I'd appreciate if somebody else could look into this.

Thanks,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]