From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9826 invoked by alias); 14 Feb 2011 13:51:50 -0000 Received: (qmail 9817 invoked by uid 22791); 14 Feb 2011 13:51:49 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 13:51:45 +0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/47727] [x32] Many passes can't handle const symbol when Pmode != ptr_mode X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 14 Feb 2011 13:58:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg01668.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47727 --- Comment #5 from H.J. Lu 2011-02-14 13:51:27 UTC --- Does this patch make any senses? diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index ce4eab4..e7e7890 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1099,10 +1099,13 @@ simplify_unary_operation_1 (enum rtx_code code, enum mac hine_mode mode, rtx op) #if defined(POINTERS_EXTEND_UNSIGNED) && !defined(HAVE_ptr_extend) /* As we do not know which address space the pointer is refering to, we can do this only if the target does not support different pointer - or address modes depending on the address space. */ + or address modes depending on the address space. Since we will + generate new instructions, we must be currently emitting into a + sequence. */ if (target_default_pointer_address_modes_p () && POINTERS_EXTEND_UNSIGNED > 0 && mode == Pmode && GET_MODE (op) == ptr_mode + && in_sequence_p () && (CONSTANT_P (op) || (GET_CODE (op) == SUBREG && REG_P (SUBREG_REG (op))