From patchwork Wed Aug 4 11:04:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 60845 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 EFC10B6EFE for ; Wed, 4 Aug 2010 21:04:53 +1000 (EST) Received: (qmail 15612 invoked by alias); 4 Aug 2010 11:04:51 -0000 Received: (qmail 15598 invoked by uid 22791); 4 Aug 2010 11:04:50 -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; Wed, 04 Aug 2010 11:04:46 +0000 Received: from relay2.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 9233A5362F for ; Wed, 4 Aug 2010 13:04:43 +0200 (CEST) Date: Wed, 4 Aug 2010 13:04:43 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR45176 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 Oversight during mem-ref development. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2010-08-04 Richard Guenther PR middle-end/45176 * expr.c (expand_expr_real_1): Also preserve TARGET_MEM_REF points-to set for original MEM_REF. Index: gcc/expr.c =================================================================== --- gcc/expr.c (revision 162858) +++ gcc/expr.c (working copy) @@ -8665,7 +8665,7 @@ expand_expr_real_1 (tree exp, rtx target set_mem_addr_space (temp, as); base = get_base_address (TMR_ORIGINAL (exp)); if (base - && INDIRECT_REF_P (base) + && (INDIRECT_REF_P (base) || TREE_CODE (base) == MEM_REF) && TMR_BASE (exp) && TREE_CODE (TMR_BASE (exp)) == SSA_NAME && POINTER_TYPE_P (TREE_TYPE (TMR_BASE (exp))))