This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/49536] New: latent bug in FSF gcc 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: Sun, 26 Jun 2011 22:44:44 +0000
- Subject: [Bug middle-end/49536] New: latent bug in FSF gcc with creation of vector of arrays
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: howarth@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.