+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
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)))
*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)))))