From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2811 invoked by alias); 1 Apr 2010 15:03:00 -0000 Received: (qmail 821 invoked by uid 48); 1 Apr 2010 15:02:36 -0000 Date: Thu, 01 Apr 2010 15:03:00 -0000 Message-ID: <20100401150236.820.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/42509] [4.5 Regression] bootstrap failure in stage3 (integer overflow in preprocessor expression) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rearnsha 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-04/txt/msg00086.txt.bz2 ------- Comment #9 from rearnsha at gcc dot gnu dot org 2010-04-01 15:02 ------- This is a miscompilation during stage2. The file libcpp/expr.c is miscompiled. The problem is occurring in num_positive, which ends up generating a shift of a long long right by 63. The code generated is creating spills that are of SImode variables for the shift output, but then the result is being loaded back as a DImode object. Due to scheduling, one of the stores is being moved incorrectly after the load and we get the following assembly fragment: 342c: fa2b fb02 lsr.w fp, fp, r2 3430: fa0c f003 lsl.w r0, ip, r3 3434: fa2c f301 lsr.w r3, ip, r1 3438: fa2c f202 lsr.w r2, ip, r2 343c: ea40 000b orr.w r0, r0, fp 3440: 9245 str r2, [sp, #276] ; 0x114 <- first part of store 3442: 4686 mov lr, r0 3444: 2201 movs r2, #1 3446: ea1e 0e21 ands.w lr, lr, r1, asr #32 344a: bf38 it cc 344c: 469e movcc lr, r3 344e: a944 add r1, sp, #272 ; 0x110 3450: e9d1 0100 ldrd r0, r1, [r1] <- Load back 3454: 2300 movs r3, #0 3456: f8cd e110 str.w lr, [sp, #272] ; 0x110 <- Second part (oops, too late). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42509