http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49536
Summary: latent bug in FSF gcc with creation of vector of arrays Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: howa...@nitro.med.uc.edu Duncan Sands has determined that http://llvm.org/bugs/show_bug.cgi?id=10042 exposes a bug in FSF gcc where vectors of arrays are being created. He proposes that the following patch to FSF gcc exposes the latent issue... Index: tree-vect-data-refs.c =================================================================== --- tree-vect-data-refs.c (revision 174743) +++ tree-vect-data-refs.c (working copy) @@ -2734,6 +2734,10 @@ scalar_type = TREE_TYPE (DR_REF (dr)); STMT_VINFO_VECTYPE (stmt_info) = get_vectype_for_scalar_type (scalar_type); + gcc_assert(!STMT_VINFO_VECTYPE (stmt_info) || + TREE_CODE (STMT_VINFO_VECTYPE (stmt_info)) != VECTOR_TYPE || + TREE_CODE (TREE_TYPE (STMT_VINFO_VECTYPE (stmt_info))) + != ARRAY_TYPE); if (!STMT_VINFO_VECTYPE (stmt_info)) { if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) by triggering an assertion failure when the tree-vectorizer tries to form a vector of arrays.