This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: Fix 61441 [5/5] Disable various transformations for signaling NaN operands
- From: "Saraswati, Sujoy (OSTL)" <sujoy dot saraswati at hpe dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, Sujoy Saraswati <ssaraswati at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>
- Date: Fri, 8 Jan 2016 08:35:45 +0000
- Subject: RE: Fix 61441 [5/5] Disable various transformations for signaling NaN operands
- Authentication-results: sourceware.org; auth=none
- References: <5379BA8D7E9D7E4D87BF6749A92854C248FC90F6 at G4W3297 dot americas dot hpqcorp dot net> <20151231093556 dot GZ18720 at tucnak dot redhat dot com> <5379BA8D7E9D7E4D87BF6749A92854C248FEBF74 at G9W0750 dot americas dot hpqcorp dot net> <20160107083214 dot GC18720 at tucnak dot redhat dot com>
Hi,
> If you have access to x86_64-linux, you can easily test it yourself with:
> make -C gcc check-gcc RUNTESTFLAGS='--target_board=unix\{-m64,-m32/-
> march=i386\} dg.exp=pr61441.c'
>
> Your patch does help.
Thanks, I tested the changes and it worked fine.
> issignalling is a GNU extension of glibc, so supposedly you should limit the
> test to the targets that use glibc, so either
> /* { dg-do run { target { *-*-linux* *-*-gnu* } } } */
> or perhaps specific target-supports.exp test for this (I wonder if android
> and/or uclibc support it).
I am making the change to limit it to Linux and gnu targets as you mentioned above. The Github for android/uclibc seems to indicate they don't support it.
I checked in the changed test case as -
Index: gcc/testsuite/gcc.dg/pr61441.c
===================================================================
--- gcc/testsuite/gcc.dg/pr61441.c (revision 232151)
+++ gcc/testsuite/gcc.dg/pr61441.c (working copy)
@@ -1,5 +1,5 @@
-/* { dg-do run } */
-/* { dg-options "-O1 -lm" } */
+/* { dg-do run { target { *-*-linux* *-*-gnu* } } } */
+/* { 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;
}
Regards,
Sujoy