This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/49536] latent bug with creation of vector of arrays
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Jun 2011 17:09:51 +0000
- Subject: [Bug middle-end/49536] latent bug with creation of vector of arrays
- Auto-submitted: auto-generated
- References: <bug-49536-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49536
--- Comment #7 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-06-27 16:46:17 UTC ---
I can confirm that the adjusted backport of...
Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c (revision 175535)
+++ gcc/tree-vect-stmts.c (working copy)
@@ -4660,6 +4660,15 @@ get_vectype_for_scalar_type (tree scalar
&& GET_MODE_BITSIZE (inner_mode) != TYPE_PRECISION (scalar_type))
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);
+
/* FORNOW: Only a single vector size per mode (UNITS_PER_SIMD_WORD)
is expected. */
nunits = UNITS_PER_SIMD_WORD (inner_mode) / nbytes;
on current gcc-4_5-branch solves the ICE under dragonegg in the original
testcase from http://llvm.org/bugs/show_bug.cgi?id=10042.