summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-ccp-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-ccp-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-ccp-1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-ccp-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-ccp-1.c
new file mode 100644
index 00000000000..db7b4b49ed2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-ccp-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dom1-details" } */
+int t(int a) __attribute__ ((const));
+void abort (void);
+int
+ccp(int b)
+{
+ int a=1;
+ a++;
+ a++;
+ a++;
+ if (b)
+ abort();
+ return a;
+}
+/* We should propagate constant 4 into return. */
+/* { dg-final { scan-tree-dump-times "Replaced.*with constant '4'" 1 "dom1"} } */