Fix 61441 [5/5] Disable various transformations for signaling NaN operands

Saraswati, Sujoy (OSTL) sujoy.saraswati@hpe.com
Thu Jan 7 06:49:00 GMT 2016


Hi,

> On Thu, Nov 26, 2015 at 08:38:55AM +0000, Saraswati, Sujoy (OSTL) wrote:
> >             PR tree-optimization/61441
> >             * gcc.dg/pr61441.c: New testcase.
> 
> Note the testcase fails on i686-linux, and even -fexcess-precision=standard
> doesn't help (-ffloat-store works, but that is a big hammer and we really
> don't want it for targets without excess precision).
> At least with -fexcess-precision=standard, the problem is in the fabs case,
> with -fexcess-precision=standard the value is then rounded from long
> double to double and that rounding affects the signalling bit.
> So, either the testcase should be compiled with -fexcess-precision=standard
> and the operation(Abs) case be guarded with #if __FLT_EVAL_METHOD__
> == 0, or something similar.

I modified the test case as below -

Index: testsuite/gcc.dg/pr61441.c
===================================================================
--- testsuite/gcc.dg/pr61441.c  (revision 232121)
+++ testsuite/gcc.dg/pr61441.c  (working copy)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-O1 -lm" } */
+/* { dg-options "-O1 -lm -fexcess-precision=standard" } */

 #define _GNU_SOURCE
 #include <stdio.h>
@@ -56,6 +56,8 @@ int main (void)
   operation(Add);
   operation(Mult);
   operation(Div);
+#if __FLT_EVAL_METHOD__ == 0
   operation(Abs);
+#endif
   return 0;
 }

However, I do not have access to a i686-linux box to test it out. Let me know if this looks fine.

I did a search on the https://gcc.gnu.org/ml/gcc-testresults/2015-12/ but couldn't see a failure report for this - is there place where I could look up to see the test results for various architectures ?

There was another issue reported on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61441, where the test fails on arm-none-eabi with unresolved symbol for issignaling(). Apparently, the newlib's math.h doesn't have the issignaling macro - let me know if I need to modify the test case to take care of this.

Regards,
Sujoy 



More information about the Gcc-patches mailing list