[2/2] testsuite: Add testcases for PR92449
diff mbox series

Message ID b5160a3a465576d79071924286e2c2401558225f.1573590370.git.segher@kernel.crashing.org
State New
Headers show
Series
  • Fix PR 92449 (unordered with -ffast-math)
Related show

Commit Message

Segher Boessenkool Nov. 12, 2019, 8:54 p.m. UTC
2019-11-12  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/testsuite/
	* gcc.c-torture/compile/pr92449.c: New test.
	* gcc.target/powerpc/pr92449-1.c: New test.

---
 gcc/testsuite/gcc.c-torture/compile/pr92449.c | 7 +++++++
 gcc/testsuite/gcc.target/powerpc/pr92449-1.c  | 7 +++++++
 2 files changed, 14 insertions(+)
 create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr92449.c
 create mode 100644 gcc/testsuite/gcc.target/powerpc/pr92449-1.c

Patch
diff mbox series

diff --git a/gcc/testsuite/gcc.c-torture/compile/pr92449.c b/gcc/testsuite/gcc.c-torture/compile/pr92449.c
new file mode 100644
index 0000000..74e7377
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr92449.c
@@ -0,0 +1,7 @@ 
+/* PR target/92449 */
+/* { dg-additional-options "-ffast-math -fno-cx-limited-range" } */
+
+void do_div (_Complex double *a, _Complex double *b)
+{
+  *a = *b / (4.0 - 5.0fi);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr92449-1.c b/gcc/testsuite/gcc.target/powerpc/pr92449-1.c
new file mode 100644
index 0000000..f9fcb84
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr92449-1.c
@@ -0,0 +1,7 @@ 
+/* { dg-options "-Ofast -mdejagnu-cpu=power9 " } */
+
+int
+compare_exponents_unordered (double exponent1, double exponent2)
+{
+  return __builtin_vec_scalar_cmp_exp_unordered (exponent1, exponent2);
+}