Currently PR49536 still exists in gcc-4_6-branch. The following patch backports r175475 for the gcc 4.6.3 release. This will be helpful to dragonegg users (http://llvm.org/bugs/show_bug.cgi?id=10042) as dragonegg currently doesn't build against FSF gcc trunk yet. Regression tested on x86_64-apple-darwin11...
http://gcc.gnu.org/ml/gcc-testresults/2012-02/msg00599.html Okay for gcc-4_6-branch and thus gcc 4.6.3? Jack 2012-02-08 Jack Howarth <howa...@bromo.med.uc.edu> Backport from mainline 2011-06-27 Richard Guenther <rguent...@suse.de> PR tree-optimization/49536 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): For non-scalar inner types use a scalar type according to the scalar inner mode. Index: gcc/tree-vect-stmts.c =================================================================== --- gcc/tree-vect-stmts.c (revision 183938) +++ gcc/tree-vect-stmts.c (working copy) @@ -5117,6 +5117,15 @@ get_vectype_for_scalar_type_and_size (tr && GET_MODE_CLASS (inner_mode) != MODE_FLOAT) return NULL_TREE; + /* We shouldn't end up building VECTOR_TYPEs of non-scalar components. + When the component mode passes the above test simply use a type + corresponding to that mode. The theory is that any use that + would cause problems with this will disable vectorization anyway. */ + if (!SCALAR_FLOAT_TYPE_P (scalar_type) + && !INTEGRAL_TYPE_P (scalar_type) + && !POINTER_TYPE_P (scalar_type)) + scalar_type = lang_hooks.types.type_for_mode (inner_mode, 1); + /* If no size was supplied use the mode the target prefers. Otherwise lookup a vector mode of the specified size. */ if (size == 0)