Message ID | 5379BA8D7E9D7E4D87BF6749A92854C248FEBF74@G9W0750.americas.hpqcorp.net |
---|---|
State | New |
Headers | show |
On Thu, Jan 07, 2016 at 06:48:25AM +0000, Saraswati, Sujoy (OSTL) wrote: > 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 - 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. 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 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 ? Perhaps H.J. uses differently configured i686-linux build? If it is configured with --with-fpmath=sse or =avx, then i387 is only used for long double and therefore the target is not excess precision target any longer. Jakub
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; }