From patchwork Sat Jul 10 00:18:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 58446 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 54BEAB6F10 for ; Sat, 10 Jul 2010 10:18:55 +1000 (EST) Received: (qmail 28455 invoked by alias); 10 Jul 2010 00:18:52 -0000 Received: (qmail 28446 invoked by uid 22791); 10 Jul 2010 00:18:51 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam-dmz.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Jul 2010 00:18:47 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 015699AC812; Sat, 10 Jul 2010 02:18:44 +0200 (CEST) Date: Sat, 10 Jul 2010 02:18:44 +0200 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix write_symbol testsuite ICE Message-ID: <20100710001844.GK9621@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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 Hi, this patch fixes the ICE while streaming out alias nodes. It is all somewhat ugly, since some aliases have varpool/cgraph nodes while others doesn't depending on if they are or are not used in code... Bootstrapped/regtested x86_64-linux, comitted as obvious. Honza 2010-07-09 Jan Hubicka * lto-streamer-out.c (produce_symtab): Do not write alias cgraph/varpool nodes. Index: lto-streamer-out.c =================================================================== --- lto-streamer-out.c (revision 161956) +++ lto-streamer-out.c (working copy) @@ -2399,6 +2399,8 @@ produce_symtab (struct output_block *ob, for (i = 0; i < lto_cgraph_encoder_size (encoder); i++) { node = lto_cgraph_encoder_deref (encoder, i); + if (node->alias) + continue; write_symbol (cache, &stream, node->decl, seen, false); for (alias = node->same_body; alias; alias = alias->next) write_symbol (cache, &stream, alias->decl, seen, true); @@ -2408,6 +2410,8 @@ produce_symtab (struct output_block *ob, for (i = 0; i < lto_varpool_encoder_size (varpool_encoder); i++) { vnode = lto_varpool_encoder_deref (varpool_encoder, i); + if (vnode->alias) + continue; write_symbol (cache, &stream, vnode->decl, seen, false); for (valias = vnode->extra_name; valias; valias = valias->next) write_symbol (cache, &stream, valias->decl, seen, true);