From patchwork Thu Nov 7 11:25:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 289295 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DC4642C0077 for ; Thu, 7 Nov 2013 22:25:42 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=NrYAwxT1TWlukrl0/WZ2zAuwglwdapb4g+/wGrwXUr+fWJg98pCq+ SM15O/p168JvRELnJxmkt4IKSo7Rs1eaHbUFaaaiV+ahiA7lLHn/5EAQLy5xlfRB q7MKkkH1YSHt01w+VdLf1aUTPEhxImn24v0OF0IOOVk0m7xbJDrV94= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=VYdsyuA6pl2JU6ZGJckHlyHYdUw=; b=mtw5ajl8hGP3osMpZIz3 4Hs+5PAlgubU9NSIqDNPnkdscny+gpFDUFVwmLjByXWzb9UNfQUeitG/a8LcXHrg t3Zai9+3+Fk30rw9y+lktG8MvqEpZlXfoBYtSYOcj+XubO0Ur/MhDYdwegSwavuq 6Gh7/6vFhpp6H2EkI5SmSKM= Received: (qmail 8700 invoked by alias); 7 Nov 2013 11:25:31 -0000 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 Received: (qmail 8681 invoked by uid 89); 7 Nov 2013 11:25:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL, BAYES_50, RDNS_NONE, SPAM_SUBJECT, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mx2.suse.de Received: from Unknown (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Nov 2013 11:25:30 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2C93EA6726 for ; Thu, 7 Nov 2013 12:25:22 +0100 (CET) Date: Thu, 7 Nov 2013 12:25:22 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix casting in get_ref_base_and_extent Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 As noticed by Richard. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2013-11-07 Richard Biener * tree-dfa.c (get_ref_base_and_extent): Fix casting. Index: gcc/tree-dfa.c =================================================================== --- gcc/tree-dfa.c (revision 204458) +++ gcc/tree-dfa.c (working copy) @@ -569,7 +569,7 @@ get_ref_base_and_extent (tree exp, HOST_ && (!bit_offset.fits_shwi () || !host_integerp (TYPE_SIZE (TREE_TYPE (exp)), 1) || (bit_offset.to_shwi () + maxsize - == (signed) TREE_INT_CST_LOW + == (HOST_WIDE_INT) TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (exp)))))) maxsize = -1; @@ -606,7 +606,8 @@ get_ref_base_and_extent (tree exp, HOST_ && (!bit_offset.fits_shwi () || !host_integerp (TYPE_SIZE (TREE_TYPE (exp)), 1) || (bit_offset.to_shwi () + maxsize - == (signed) TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (exp)))))) + == (HOST_WIDE_INT) TREE_INT_CST_LOW + (TYPE_SIZE (TREE_TYPE (exp)))))) maxsize = -1; done: