From patchwork Fri Aug 20 15:53:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 62289 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 E2353B70AA for ; Sat, 21 Aug 2010 01:52:57 +1000 (EST) Received: (qmail 28299 invoked by alias); 20 Aug 2010 15:52:56 -0000 Received: (qmail 28288 invoked by uid 22791); 20 Aug 2010 15:52:54 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Aug 2010 15:52:50 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7KFqmqh024584 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 20 Aug 2010 11:52:48 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7KFql8m012732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 20 Aug 2010 11:52:48 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id o7KFrFlX012607 for ; Fri, 20 Aug 2010 17:53:15 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id o7KFrFuH012605 for gcc-patches@gcc.gnu.org; Fri, 20 Aug 2010 17:53:15 +0200 Date: Fri, 20 Aug 2010 17:53:15 +0200 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix libmudflap.c++/pass57-frag.cxx Message-ID: <20100820155315.GE702@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes 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 Hi! Richard changed 4 days ago TARGET_MEM_REF representation, the offset now uses some pointer type for offsets on the constants instead of sizetype. The following patch makes sure we don't create invalid PLUS_EXPR with sizetype first operand and result, but pointer type INTEGER_CST as second argument. Bootstrapped/regtested on x86_64-linux and i686-linux, committing as obvious. 2010-08-20 Jakub Jelinek Michael Matz * tree-ssa-address.c (tree_mem_ref_addr): Convert offset to sizetype. Jakub --- gcc/tree-ssa-address.c.jj 2010-08-16 19:24:24.000000000 +0200 +++ gcc/tree-ssa-address.c 2010-08-20 15:53:03.000000000 +0200 @@ -299,6 +299,7 @@ tree_mem_ref_addr (tree type, tree mem_r if (offset && !integer_zerop (offset)) { + offset = fold_convert (sizetype, offset); if (addr_off) addr_off = fold_build2 (PLUS_EXPR, sizetype, addr_off, offset); else