aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pop <s.pop@samsung.com>2015-10-02 16:03:48 +0000
committerSebastian Pop <spop@gcc.gnu.org>2015-10-02 16:03:48 +0000
commit5e4f82ab30cb0e2517925d0cfcaf7867a7949fb6 (patch)
tree6c4560941e567f63a09a2de84d8bb38c1fae7796
parent9d85345afada4b66186519111949a5fde22d7b87 (diff)
downloadgcc-5e4f82ab30cb0e2517925d0cfcaf7867a7949fb6.zip
gcc-5e4f82ab30cb0e2517925d0cfcaf7867a7949fb6.tar.gz
gcc-5e4f82ab30cb0e2517925d0cfcaf7867a7949fb6.tar.bz2
add testcase
From-SVN: r228401
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/graphite/scop-23.c40
2 files changed, 44 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 943227a..18f7b07 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..d0627f8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/scop-23.c
@@ -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"} } */