From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25145 invoked by alias); 2 Jan 2010 23:00:45 -0000 Received: (qmail 24951 invoked by uid 48); 2 Jan 2010 23:00:30 -0000 Date: Sat, 02 Jan 2010 23:00:00 -0000 Message-ID: <20100102230030.24950.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/42564] unrecognizable insn with -O -fPIC In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ebotcazou at gcc dot gnu dot org" 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: 2010-01/txt/msg00206.txt.bz2 ------- Comment #8 from ebotcazou at gcc dot gnu dot org 2010-01-02 23:00 ------- The root of the problem is plus_constant wrapping up a TLS symbol in a CONST: (const:DI (plus:DI (symbol_ref:DI ("m") [flags 0x1a] ) (const_int 4 [0x4]))) what the SPARC back-end doesn't like. So something like this works: Index: explow.c =================================================================== --- explow.c (revision 155516) +++ explow.c (working copy) @@ -137,7 +137,8 @@ plus_constant (rtx x, HOST_WIDE_INT c) case SYMBOL_REF: case LABEL_REF: - all_constant = 1; + if (CONSTANT_ADDRESS_P (x)) + all_constant = 1; break; case PLUS: but I presume other back-ends may not necessarily like it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42564