aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-6.c
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-09-09 23:36:31 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-09-09 23:36:31 +0000
commit7b05d0f6a17397063a19232936eee7bbb53cd0dd (patch)
tree111942606d6f12c7aa3dc294d0040d9a3c134ae2 /gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-6.c
parenta981e4500a6364a7af778544cbcbc22bffc4cb58 (diff)
parent65f8bbbcc74a4777f0629190ea9121fc94a79257 (diff)
downloadtoolchain_gcc-7b05d0f6a17397063a19232936eee7bbb53cd0dd.zip
toolchain_gcc-7b05d0f6a17397063a19232936eee7bbb53cd0dd.tar.gz
toolchain_gcc-7b05d0f6a17397063a19232936eee7bbb53cd0dd.tar.bz2
Merge changes I65f8bbbc,Iaa65e2d1,Ifa0139c9,Ic39d2a2b,I78cf0a23
* changes: backport fix for PR65735 backport patch to fix PR65177 backport patch to fix PR65048 backport patch for PR 64878: do not jump thread across more than one back-edge port revision 219584 from linaro/gcc-4_9-branch
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-6.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-6.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-6.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-6.c
new file mode 100644
index 0000000..bb34a74
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-6.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dom1-details" } */
+/* { dg-final { scan-tree-dump-times "FSM" 6 "dom1" } } */
+/* { dg-final { cleanup-tree-dump "dom1" } } */
+
+int sum0, sum1, sum2, sum3;
+int foo (char *s, char **ret)
+{
+ int state=0;
+ char c;
+
+ for (; *s && state != 4; s++)
+ {
+ c = *s;
+ if (c == '*')
+ {
+ s++;
+ break;
+ }
+ switch (state)
+ {
+ case 0:
+ if (c == '+')
+ state = 1;
+ else if (c != '-')
+ sum0+=c;
+ break;
+ case 1:
+ if (c == '+')
+ state = 2;
+ else if (c == '-')
+ state = 0;
+ else
+ sum1+=c;
+ break;
+ default:
+ break;
+ }
+
+ }
+ *ret = s;
+ return state;
+}