From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 356 invoked by alias); 10 Jun 2008 20:06:38 -0000 Received: (qmail 32723 invoked by uid 48); 10 Jun 2008 20:05:54 -0000 Date: Tue, 10 Jun 2008 20:06:00 -0000 Subject: [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jsm28 at gcc dot gnu dot org" 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: 2008-06/txt/msg00609.txt.bz2 The following code aborts if built for i686-pc-linux-gnu with -msse2 -O3. extern void abort (void); int main (void) { int i; long x[12] __attribute__((aligned(16))); x[0] = 1; for (i = 0; i < 12; i++) x[i] = i; if (x[0] != 0) abort (); return 0; } The loop gets vectorized using "vector int *" pointers, and then the compiler decides that "vector int" writes don't conflict with "long" reads. (If an array of int is used instead, the test passes.) (Not x86-specific; originally observed as a failure of gcc.c-torture/execute/loop-13.c on SPE with an unsubmitted patch to support autovectorization there.) -- Summary: [4.3/4.4 Regression] vectorizer aliasing bug Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jsm28 at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493