summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/20040513-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/20040513-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20040513-2.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040513-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20040513-2.c
new file mode 100644
index 000000000..a3edf9b80
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20040513-2.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-dom2" } */
+int link_error(void);
+int s(void);
+
+int t(int i)
+{
+ _Bool g = i == 4;
+ int h = g;
+ _Bool j = h;
+ int k = j;
+ _Bool l = k == 0;
+ _Bool o = !l;
+ int m = o;
+
+ if (m)
+ if (i != 4)
+ return link_error();
+ return 0;
+}
+
+/* There should be no link_error calls, if there is any, the
+ optimization has failed */
+/* { dg-final { scan-tree-dump-times "link_error" 0 "dom2"} } */
+/* { dg-final { cleanup-tree-dump "dom2" } } */