From patchwork Mon Aug 29 08:49:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 111991 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 8976EB6F82 for ; Mon, 29 Aug 2011 18:49:40 +1000 (EST) Received: (qmail 3996 invoked by alias); 29 Aug 2011 08:49:38 -0000 Received: (qmail 3988 invoked by uid 22791); 29 Aug 2011 08:49:37 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Aug 2011 08:49:21 +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 mx2.suse.de (Postfix) with ESMTP id 6F54A8738D for ; Mon, 29 Aug 2011 10:49:20 +0200 (CEST) Date: Mon, 29 Aug 2011 10:49:20 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Add missing location to &MEM 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 Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2011-08-29 Richard Guenther * gimple-fold.c (gimple_fold_stmt_to_constant_1): Set a location on the built ADDR_EXPR. Index: gcc/gimple-fold.c =================================================================== --- gcc/gimple-fold.c (revision 178155) +++ gcc/gimple-fold.c (working copy) @@ -2987,8 +2956,9 @@ gimple_fold_stmt_to_constant_1 (gimple s && TREE_CODE (op1) == INTEGER_CST) { tree off = fold_convert (ptr_type_node, op1); - return build_fold_addr_expr - (fold_build2 (MEM_REF, + return build_fold_addr_expr_loc + (loc, + fold_build2 (MEM_REF, TREE_TYPE (TREE_TYPE (op0)), unshare_expr (op0), off)); }