aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRoman Gareev <gareevroman@gmail.com>2014-07-24 14:08:29 +0000
committerRoman Gareev <romangareev@gcc.gnu.org>2014-07-24 14:08:29 +0000
commita663102770082432f660f5e3e572221f5a48655d (patch)
tree48a5d78f5dc33dd2c062d14b1d20c34fc61dc00a /gcc/testsuite
parentdacd445e14adb14de376a623d8686f93d3697729 (diff)
downloadgcc-a663102770082432f660f5e3e572221f5a48655d.zip
gcc-a663102770082432f660f5e3e572221f5a48655d.tar.gz
gcc-a663102770082432f660f5e3e572221f5a48655d.tar.bz2
[gcc/]
* graphite-isl-ast-to-gimple.c: (graphite_create_new_loop): Add calling of isl_id_free to properly decrement reference counts. [gcc/testsuite] * gcc.dg/graphite/isl-ast-gen-blocks-4.c: New testcase. From-SVN: r212994
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-4.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-4.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-4.c
new file mode 100644
index 0000000..36c0159
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-4.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
+
+static int __attribute__((noinline))
+foo (int k, int n1, int n2, int n3)
+{
+ int j, res = 0;
+ for (j = 0; j < k; j++)
+ {
+ int i;
+ for (i = 0; i < n1; i++)
+ res += i;
+ for (i = 0; i < n2; i++)
+ res += i;
+ for (i = 0; i < n3; i++)
+ res += i;
+ }
+
+ return res;
+}
+
+extern void abort ();
+
+int
+main (void)
+{
+ int res = foo (4, 50, 50, 50);
+ if (res != 14700)
+ abort ();
+
+ return 0;
+}