Patchwork [1/6] Add testcase for PR43567.

login
register
mail settings
Submitter Sebastian Pop
Date Jan. 18, 2011, 8:51 p.m.
Message ID <1295383896-27122-2-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/79354/
State New
Headers show

Comments

Sebastian Pop - Jan. 18, 2011, 8:51 p.m.
2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/43567
	* gcc.dg/graphite/pr43567.c: New.
---
 gcc/ChangeLog.graphite                  |    5 +++++
 gcc/testsuite/gcc.dg/graphite/pr43567.c |   26 ++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/graphite/pr43567.c

Patch

diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index e20e034..8440b84 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,8 @@ 
+2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
+
+	PR tree-optimization/43567
+	* gcc.dg/graphite/pr43567.c: New.
+
 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
 
 	* Makefile.in (LAMBDA_H): Removed.
diff --git a/gcc/testsuite/gcc.dg/graphite/pr43567.c b/gcc/testsuite/gcc.dg/graphite/pr43567.c
new file mode 100644
index 0000000..1bb8042
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr43567.c
@@ -0,0 +1,26 @@ 
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-inline -fno-tree-ch -ftree-loop-linear" } */
+
+extern void abort ();
+
+int
+test (int n, int *a)
+{
+  int i, j;
+
+  for (i = 0; i < n; i++)
+    for (j = 0; j < n; j++)
+      a[j] = i + n;
+
+  if (a[0] != 31 || i + n - 1 != 31)
+    abort ();
+
+  return 0;
+}
+
+int main (void)
+{
+  int a[16];
+  test (16, a);
+  return 0;
+}