From cc7d06c4227ddff46d8ae50e1e7d5b1667f7243d Mon Sep 17 00:00:00 2001 From: spop Date: Tue, 25 Jan 2011 21:25:24 +0000 Subject: [PATCH] Add testcase for PR46970. 2011-01-18 Sebastian Pop PR tree-optimization/46970 * gcc.dg/graphite/pr46970.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169257 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/graphite/pr46970.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/graphite/pr46970.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c06eda3ee13..9db1dc7bafc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2011-01-25 Sebastian Pop + PR tree-optimization/46970 + * gcc.dg/graphite/pr46970.c: New. + +2011-01-25 Sebastian Pop + PR tree-optimization/46215 * gcc.dg/graphite/pr46215.c: New. diff --git a/gcc/testsuite/gcc.dg/graphite/pr46970.c b/gcc/testsuite/gcc.dg/graphite/pr46970.c new file mode 100644 index 00000000000..b1ef7d62b62 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/pr46970.c @@ -0,0 +1,28 @@ +/* { dg-do run } */ +/* { dg-options "-Os -ftree-loop-linear" } */ + +#define N 16 + +int +main1 (int n, int *a) +{ + int i, j; + + for (i = 0; i < n; i++) + for (j = 0; j < n; j++) + a[j] = i + n; + + for (j = 0; j < n; j++) + if (a[j] != i + n - 1) + __builtin_abort (); + + return 0; +} + +int +main () +{ + int a[N]; + main1 (N, a); + return 0; +} -- 2.11.4.GIT