From patchwork Sat Jun 19 11:10:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 56242 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 123371007D5 for ; Sat, 19 Jun 2010 21:10:59 +1000 (EST) Received: (qmail 29938 invoked by alias); 19 Jun 2010 11:10:50 -0000 Received: (qmail 29856 invoked by uid 22791); 19 Jun 2010 11:10:49 -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; Sat, 19 Jun 2010 11:10:42 +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 E96C98D893 for ; Sat, 19 Jun 2010 13:10:39 +0200 (CEST) Date: Sat, 19 Jun 2010 13:10:39 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH][mem-ref2] Fix ppc bootstrap 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 fixes ppc bootstrap by simply handling all MEM_REFs with possibly-register object that has a non-MEM RTL via the bitfield path. Bootstrapped and tested on x86_64-unknown-linux-gnu and ppc64-linux-gnu, committed. ppc64 results differ the same from trunk as the x86_64 results do, so appearanlty no surprises on big-endian targets. Richard. 2010-06-19 Richard Guenther * expr.c (expand_expr_real_1): Expand all non-MEM MEM_REFs via the bitfield path. Index: gcc/expr.c =================================================================== --- gcc/expr.c (revision 160990) +++ gcc/expr.c (working copy) @@ -8817,7 +8817,9 @@ expand_expr_real_1 (tree exp, rtx target decl we must use bitfield operations. */ if (DECL_P (base) && !TREE_ADDRESSABLE (base) - && DECL_MODE (base) != BLKmode) + && DECL_MODE (base) != BLKmode + && DECL_RTL_SET_P (base) + && !MEM_P (DECL_RTL (base))) { tree bftype; if (offset == 0 @@ -8827,9 +8829,6 @@ expand_expr_real_1 (tree exp, rtx target return expand_expr (build1 (VIEW_CONVERT_EXPR, TREE_TYPE (exp), base), target, tmode, modifier); - gcc_assert (!DECL_RTL_SET_P (base) - || REG_P (DECL_RTL (base)) - || GET_CODE (DECL_RTL (base)) == CONCAT); bit_offset = bitsize_int (offset * BITS_PER_UNIT); bftype = TREE_TYPE (base); if (TYPE_MODE (TREE_TYPE (exp)) != BLKmode)