diff mbox series

[COMMITTED,PR106867] Add test for PR.

Message ID 20220907105949.3547286-1-aldyh@redhat.com
State New
Headers show
Series [COMMITTED,PR106867] Add test for PR. | expand

Commit Message

Aldy Hernandez Sept. 7, 2022, 10:59 a.m. UTC
PR tree-optimization/106867

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/pr106867.c: New test.
---
 gcc/testsuite/gcc.dg/tree-ssa/pr106867.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr106867.c
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr106867.c b/gcc/testsuite/gcc.dg/tree-ssa/pr106867.c
new file mode 100644
index 00000000000..68773d9ae74
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr106867.c
@@ -0,0 +1,16 @@ 
+// { dg-do compile }
+// { dg-options "-O2 -fno-tree-fre" }
+
+double m;
+int n;
+
+void
+foo (void)
+{
+  static double a[] = { 0.0 / 0.0, 0.0 };
+  int i;
+
+  for (i = 0; i < n; ++i)
+    if (m >= a[i])
+      __builtin_abort ();
+}