From 5e4f82ab30cb0e2517925d0cfcaf7867a7949fb6 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Fri, 2 Oct 2015 16:03:48 +0000 Subject: [PATCH] add testcase From-SVN: r228401 --- gcc/testsuite/ChangeLog | 4 +++ gcc/testsuite/gcc.dg/graphite/scop-23.c | 40 +++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/graphite/scop-23.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 943227a8df8..18f7b07618c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-10-02 Sebastian Pop + + * gcc.dg/graphite/scop-23.c: New. + 2015-10-02 Kirill Yukhin * 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 00000000000..d0627f8d70c --- /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"} } */ -- 2.30.2