From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21710 invoked by alias); 27 Jun 2011 17:10:06 -0000 Received: (qmail 21697 invoked by uid 22791); 27 Jun 2011 17:10:05 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Jun 2011 17:09:51 +0000 From: "howarth at nitro dot med.uc.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/49536] latent bug with creation of vector of arrays X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: howarth at nitro dot med.uc.edu X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 27 Jun 2011 17:10:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg02614.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49536 --- Comment #7 from Jack Howarth 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.