aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@gcc.gnu.org>2009-01-28 18:17:13 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2009-01-28 18:17:13 +0000
commitb990b40f023aef5d01dc60a7582770302eef1706 (patch)
tree561b66d139e4b229fab416161ec0271daaaf02fa
parent59dc48988aab8274b90dfd4e0e9ebbb7dd2e7007 (diff)
downloadgcc-b990b40f023aef5d01dc60a7582770302eef1706.zip
gcc-b990b40f023aef5d01dc60a7582770302eef1706.tar.gz
gcc-b990b40f023aef5d01dc60a7582770302eef1706.tar.bz2
re PR tree-optimization/38997 (-ftree-loop-distribution ICEs)
gcc/ PR tree-optimization/38997 * tree-loop-distribution.c (generate_memset_zero): Use POINTER_PLUS_EXPR for a pointer addition. gcc/testsuite/ PR tree-optimization/38997 * gcc.dg/tree-ssa/pr38997.c: New. From-SVN: r143740
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr38997.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr38997.c b/gcc/testsuite/gcc.dg/tree-ssa/pr38997.c
new file mode 100644
index 0000000..211203c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr38997.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribution" } */
+
+int a[8][8];
+int b[8];
+
+void
+foo (int i)
+{
+ int j;
+ for (j = 0; j < 8; j++)
+ {
+ a[i][j] = 0;
+ b[j] = j;
+ }
+}