From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20911 invoked by alias); 6 Jan 2010 23:10:52 -0000 Received: (qmail 20704 invoked by uid 48); 6 Jan 2010 23:10:32 -0000 Date: Wed, 06 Jan 2010 23:10:00 -0000 Subject: [Bug tree-optimization/42640] New: wrong code for -ftree-loop-distribution in 175.vpr X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "janis 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: 2010-01/txt/msg00714.txt.bz2 Benchmark test 175.vpr from SPEC CPU2000 gets incorrect results on powerpc64-linux when compiled with "-O2 -ftree-loop-distribution", as shown by a minimized testcase that I'll attach to this PR. The inner loop is: inode = s_node; for (iloop = 1; iloop <= 2; iloop++) { rr_node[inode].a = i; rr_node[inode].b = j; rr_node[inode].c = ipad; inode = p_node; } Expected output: elm3b149% /home/janis/tools/gcc-trunk-anonsvn-32/bin/gcc -O2 bug.c && ./a.out rr_node[0] = 1 2 0 rr_node[1] = 1 2 1 rr_node[2] = 1 2 0 rr_node[3] = 1 2 1 Bad output: elm3b149% /home/janis/tools/gcc-trunk-anonsvn-32/bin/gcc -O2 -ftree-loop-distribution bug.c && ./a.out rr_node[0] = 1 2 0 rr_node[1] = 1 2 1 rr_node[2] = 0 0 0 rr_node[3] = 0 0 1 The test also fails with GCC 4.4.2. -- Summary: wrong code for -ftree-loop-distribution in 175.vpr Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janis at gcc dot gnu dot org GCC target triplet: powerpc64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42640