From patchwork Thu Jul 1 10:21:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 57499 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 9CFACB6EF7 for ; Thu, 1 Jul 2010 20:21:36 +1000 (EST) Received: (qmail 25259 invoked by alias); 1 Jul 2010 10:21:34 -0000 Received: (qmail 25250 invoked by uid 22791); 1 Jul 2010 10:21:34 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Jul 2010 10:21:30 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 1173493F19 for ; Thu, 1 Jul 2010 12:21:28 +0200 (CEST) Date: Thu, 1 Jul 2010 12:21:27 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix bootstrap issue on 32bit HWI hosts Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This should address the issue seen by Geoffs tester. I am in the process of 1) reproducing the issue and 2) verifying the fix below fixes the issue. The patch below has already been bootstrapped on x86_64-unknown-linux-gnu. Richard. 2010-07-01 Richard Guenther * emit-rtl.c (set_mem_attributes_minus_bitpos): Use unsigned types for offsets. Index: gcc/emit-rtl.c =================================================================== --- gcc/emit-rtl.c (revision 161657) +++ gcc/emit-rtl.c (working copy) @@ -1616,10 +1616,10 @@ set_mem_attributes_minus_bitpos (rtx ref align = MAX (align, TYPE_ALIGN (type)); else if (TREE_CODE (t) == MEM_REF) { - HOST_WIDE_INT aoff = BITS_PER_UNIT; + unsigned HOST_WIDE_INT aoff = BITS_PER_UNIT; if (host_integerp (TREE_OPERAND (t, 1), 1)) { - HOST_WIDE_INT ioff = TREE_INT_CST_LOW (TREE_OPERAND (t, 1)); + unsigned HOST_WIDE_INT ioff = TREE_INT_CST_LOW (TREE_OPERAND (t, 1)); aoff = (ioff & -ioff) * BITS_PER_UNIT; } if (TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR