From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12178 invoked by alias); 25 Sep 2012 09:54:02 -0000 Received: (qmail 11912 invoked by uid 48); 25 Sep 2012 09:53:37 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/54095] Unnecessary static variable renaming Date: Tue, 25 Sep 2012 09:54:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Keywords: lto X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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 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: 2012-09/txt/msg02030.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54095 --- Comment #9 from Richard Guenther 2012-09-25 09:53:36 UTC --- Indeed: Index: gcc/lto-streamer-out.c =================================================================== --- gcc/lto-streamer-out.c (revision 191694) +++ gcc/lto-streamer-out.c (working copy) @@ -1001,6 +1001,7 @@ lto_output (void) gcc_assert (!bitmap_bit_p (output, DECL_UID (node->symbol.decl))); bitmap_set_bit (output, DECL_UID (node->symbol.decl)); #endif + gcc_assert (symtab_real_symbol_p ((symtab_node) node)); decl_state = lto_new_out_decl_state (); lto_push_out_decl_state (decl_state); if (gimple_has_body_p (node->symbol.decl)) produces #1 0x0000000000822316 in lto_output () at /space/rguenther/src/svn/trunk/gcc/lto-streamer-out.c:1004 1004 gcc_assert (symtab_real_symbol_p ((symtab_node) node)); (gdb) call debug_cgraph_node (node) _ZL14get_md_ptr_locPKv/171 (get_md_ptr_loc) @0x7ffff6274888 Type: function Visibility: prevailing_def_ironly previous sharing asm name: 781 References: _ZL8ptr_locs/151 (read) Referring: Read from file: build/read-md.o Function get_md_ptr_loc/171 is inline copy in fprint_md_ptr_loc/173 Availability: local Function flags: analyzed local finalized Called by: _Z17fprint_md_ptr_locP8_IO_FILEPKv/173 (1.00 per call) (inlined) Calls: htab_find/544 (1.00 per call) Trying /* If there is a symbol in the set that shares the same asm name than NODE, rename NODE. */ if (!TREE_PUBLIC (decl) && (!symtab_function_p (node) || lto_symtab_encoder_encode_body_p (encoder, cgraph (node)))) for (s = symtab_node_for_asm (DECL_ASSEMBLER_NAME (decl)); s; s = s->symbol.next_sharing_asm_name) if (s != node && lto_symtab_encoder_lookup (encoder, s) != LCC_NOT_FOUND && (!symtab_function_p (s) || lto_symtab_encoder_encode_body_p (encoder, cgraph (s)))) {