aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDorit Naishlos <dorit@il.ibm.com>2005-03-17 21:08:06 +0000
committerDorit Nuzman <dorit@gcc.gnu.org>2005-03-17 21:08:06 +0000
commitd6efd7d667d07cbf0dddba3961dc7681f3f644ea (patch)
tree4554f320f96b682b69921d2e131d1f9f7ba6d781
parent981c7dcef835c914783cd456ee18a29611afe4db (diff)
downloadgcc-d6efd7d667d07cbf0dddba3961dc7681f3f644ea.zip
gcc-d6efd7d667d07cbf0dddba3961dc7681f3f644ea.tar.gz
gcc-d6efd7d667d07cbf0dddba3961dc7681f3f644ea.tar.bz2
re PR tree-optimization/20474 (ICE while compiling openmotif-2.2.3 with -ftree-vectorize)
PR tree-optimization/20474 * tree-vect-analyze.c (vect_analyze_pointer_ref_access): Check the size_type of the relevant pointer. Check for COMPLETE_TYPE_P. From-SVN: r96632
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-vect-analyze.c11
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dd11e2c..19f8137 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-17 Dorit Naishlos <dorit@il.ibm.com>
+
+ PR tree-optimization/20474
+ * tree-vect-analyze.c (vect_analyze_pointer_ref_access): Check the
+ size_type of the relevant pointer. Check for COMPLETE_TYPE_P.
+
2005-03-17 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300-protos.h: Remove prototypes for
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index 0ee6f0c..dd9342a 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -1401,8 +1401,7 @@ vect_analyze_pointer_ref_access (tree memref, tree stmt, bool is_read,
return NULL;
}
- reftype = TREE_TYPE (init);
- if (!POINTER_TYPE_P (reftype))
+ if (!POINTER_TYPE_P (TREE_TYPE (init)))
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS,
LOOP_LOC (loop_vinfo)))
@@ -1412,6 +1411,14 @@ vect_analyze_pointer_ref_access (tree memref, tree stmt, bool is_read,
*ptr_step = fold_convert (ssizetype, step);
innertype = TREE_TYPE (reftype);
+ if (!COMPLETE_TYPE_P (innertype))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS,
+ LOOP_LOC (loop_vinfo)))
+ fprintf (vect_dump, "not vectorized: pointer to incomplete type.");
+ return NULL;
+ }
+
/* Check that STEP is a multiple of type size. */
if (!integer_zerop (size_binop (TRUNC_MOD_EXPR, *ptr_step,
fold_convert (ssizetype, TYPE_SIZE_UNIT (innertype)))))