From: Uros Bizjak Date: Sun, 29 Oct 2017 07:31:56 +0000 (+0100) Subject: * gcc.dg/torture/pr82692.c: Move from gcc.target/i386. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7719f04695a5acf661ebd9229215eb9ce8c2bf5f;p=gcc.git * gcc.dg/torture/pr82692.c: Move from gcc.target/i386. From-SVN: r254205 --- diff --git a/gcc/testsuite/gcc.dg/torture/pr82692.c b/gcc/testsuite/gcc.dg/torture/pr82692.c new file mode 100644 index 00000000000..254ace15ada --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr82692.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-add-options ieee } */ +/* { dg-require-effective-target fenv_exceptions } */ + +#include + +extern void abort (void); +extern void exit (int); + +double __attribute__ ((noinline, noclone)) +foo (double x) +{ + if (__builtin_islessequal (x, 0.0) || __builtin_isgreater (x, 1.0)) + return x + x; + return x * x; +} + +int +main (void) +{ + volatile double x = foo (__builtin_nan ("")); + if (fetestexcept (FE_INVALID)) + abort (); + exit (0); +} diff --git a/gcc/testsuite/gcc.target/i386/pr82692.c b/gcc/testsuite/gcc.target/i386/pr82692.c deleted file mode 100644 index 7f16804c196..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr82692.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-O2" } */ -/* { dg-require-effective-target fenv_exceptions } */ - -#include - -extern void abort (void); -extern void exit (int); - -double __attribute__ ((noinline, noclone)) -foo (double x) -{ - if (__builtin_islessequal (x, 0.0) || __builtin_isgreater (x, 1.0)) - return x + x; - return x * x; -} - -int -main (void) -{ - volatile double x = foo (__builtin_nan ("")); - if (fetestexcept (FE_INVALID)) - abort (); - exit (0); -}