summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-5.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-5.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-5.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-5.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-5.c
new file mode 100644
index 000000000..88bd81e25
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-5.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+/* Testcase from PR15353. */
+
+int g(void);
+int h(void);
+int f(int *i, int *j)
+{
+ while (1)
+ {
+ if (*i > *j || *i == *j)
+ break;
+ return g();
+ }
+ return h();
+}
+
+/* { dg-final { scan-tree-dump ">=" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */