aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRoman Gareev <gareevroman@gmail.com>2014-07-24 13:35:27 +0000
committerRoman Gareev <romangareev@gcc.gnu.org>2014-07-24 13:35:27 +0000
commitc4bc3399f7605a632da40532e19d5fd3c33cc09d (patch)
treeb96485ce9e2ff13f63b6643aae6ce0e8d2c3115b /gcc/testsuite
parent25be91ac7e13ce5c2de638b8a5a0c4190e5cb0bf (diff)
downloadgcc-c4bc3399f7605a632da40532e19d5fd3c33cc09d.zip
gcc-c4bc3399f7605a632da40532e19d5fd3c33cc09d.tar.gz
gcc-c4bc3399f7605a632da40532e19d5fd3c33cc09d.tar.bz2
[gcc/]
* graphite-isl-ast-to-gimple.c: (binary_op_to_tree): Add calling of translate_isl_ast_node_block. (gcc_expression_from_isl_expr_op): Move isl_ast_op_pdiv_q, isl_ast_op_pdiv_r to the different case. [gcc/testsuite] * gcc.dg/graphite/isl-ast-gen-blocks-3.c: New testcase. From-SVN: r212990
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c
new file mode 100644
index 0000000..d4a902d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
+
+/* We use a global variable 'k' to avoid ipa-cp. */
+int k = 50;
+static int __attribute__((noinline))
+foo ()
+{
+ int i, res = 0;
+ for (i = k/2; i < k; i++)
+ res += i;
+
+ return res;
+}
+
+extern void abort ();
+
+int
+main (void)
+{
+ int res = foo ();
+
+ if (res != 925)
+ abort ();
+
+ return 0;
+}