add testcase
authorSebastian Pop <s.pop@samsung.com>
Fri, 2 Oct 2015 16:03:48 +0000 (16:03 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Fri, 2 Oct 2015 16:03:48 +0000 (16:03 +0000)
From-SVN: r228401

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/graphite/scop-23.c [new file with mode: 0644]

index 943227a8df889b042540a1ce324948d0cf0c64df..18f7b07618c2f9b2514c371e03f7c8fd87b2a1d6 100644 (file)
@@ -1,3 +1,7 @@
+2015-10-02  Sebastian Pop  <s.pop@samsung.com>
+
+       * gcc.dg/graphite/scop-23.c: New.
+
 2015-10-02  Kirill Yukhin  <kirill.yukhin@intel.com>
 
        * gcc.target/i386/builtin_target.c: Handle "avx512ifma"
diff --git a/gcc/testsuite/gcc.dg/graphite/scop-23.c b/gcc/testsuite/gcc.dg/graphite/scop-23.c
new file mode 100644 (file)
index 0000000..d0627f8
--- /dev/null
@@ -0,0 +1,40 @@
+int toto()
+{
+  int i,j, b;
+  int a[100];
+
+  if (i == 20)
+    {
+      for (j = 0; j <= 20; j++)
+        a[j] = b + i;
+      for (j = 2; j <= 23; j++)
+        a[j] = b + i;
+      b = 3;
+    }
+  else if (i == 12)
+    {
+      if (i == 30)
+       {
+          for (j = 0; j <= 30; j++)
+            a[j] = b + i;
+         b = 5;
+       }
+      else
+       {
+          for (j = 0; j <= 40; j++)
+            a[j] = b + i;
+         b = 8;
+       }
+    }
+  else if (i == 10)
+    {
+      b = 8;
+    }
+
+  for (j = 0; j <= 40; j++)
+    a[j] = b + i;
+
+  return a[b];
+}
+
+/* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite"} } */