From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3395 invoked by alias); 4 May 2015 09:24:08 -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 Received: (qmail 3358 invoked by uid 48); 4 May 2015 09:24:04 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/65935] [6 Regression] 433.milc in SPEC CPU 2006 is miscompiled Date: Mon, 04 May 2015 09:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg00173.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65935 --- Comment #8 from Richard Biener --- Testcase that also fails with -m64. /* { dg-do run } */ /* { dg-additional-options "-O3" } */ /* { dg-require-effective-target vect_double } */ #include "tree-vect.h" extern void abort (void); extern void *malloc (__SIZE_TYPE__); struct site { struct { struct { double real; double imag; } e[3][3]; } link[32]; double phase[32]; } *lattice; int sites_on_node; void rephase (void) { int i,j,k,dir; struct site *s; for(i=0,s=lattice;ilink[dir].e[j][k].real *= s->phase[dir]; s->link[dir].e[j][k].imag *= s->phase[dir]; } } int main() { int i,j,k; check_vect (); sites_on_node = 1; lattice = malloc (sizeof (struct site) * sites_on_node); for (i = 0; i < 32; ++i) { lattice->phase[i] = i; for (j = 0; j < 3; ++j) for (k = 0; k < 3; ++k) { lattice->link[i].e[j][k].real = 1.0; lattice->link[i].e[j][k].imag = 1.0; __asm__ volatile ("" : : : "memory"); } } rephase (); for (i = 0; i < 32; ++i) for (j = 0; j < 3; ++j) for (k = 0; k < 3; ++k) if (lattice->link[i].e[j][k].real != i || lattice->link[i].e[j][k].imag != i) abort (); return 0; } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "slp1" } } */ /* { dg-final { cleanup-tree-dump "slp1" } } */ /* { dg-final { cleanup-tree-dump "vect" } } */