public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/55466] [4.8 Regression] Revision 191466 destroyed DWARF debug info Date: Thu, 29 Nov 2012 19:09:00 -0000 [thread overview] Message-ID: <bug-55466-4-b2IEno4BZu@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55466-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55466 --- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-29 19:08:28 UTC --- This patch: diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index 0b0cdac..295fd37 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -443,10 +443,6 @@ lto_symtab_merge_decls_1 (symtab_node first) symtab_prevail_in_asm_name_hash (prevailing); - /* Record the prevailing variable. */ - if (TREE_CODE (prevailing->symbol.decl) == VAR_DECL) - vec_safe_push (lto_global_var_decls, prevailing->symbol.decl); - /* Diagnose mismatched objects. */ for (e = prevailing->symbol.next_sharing_asm_name; e; e = e->symbol.next_sharing_asm_name) diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 376af85..177fbfc 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -2910,6 +2910,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) struct cgraph_node *node; int count = 0; struct lto_file_decl_data **decl_data; + struct varpool_node *vnode; init_cgraph (); @@ -3088,6 +3089,10 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) timevar_pop (TV_IPA_LTO_CGRAPH_MERGE); + /* Record the global variables. */ + FOR_EACH_DEFINED_VARIABLE (vnode) + vec_safe_push (lto_global_var_decls, vnode->symbol.decl); + timevar_push (TV_IPA_LTO_DECL_INIT_IO); /* Indicate that the cgraph is built and ready. */ or diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index 0b0cdac..295fd37 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -443,10 +443,6 @@ lto_symtab_merge_decls_1 (symtab_node first) symtab_prevail_in_asm_name_hash (prevailing); - /* Record the prevailing variable. */ - if (TREE_CODE (prevailing->symbol.decl) == VAR_DECL) - vec_safe_push (lto_global_var_decls, prevailing->symbol.decl); - /* Diagnose mismatched objects. */ for (e = prevailing->symbol.next_sharing_asm_name; e; e = e->symbol.next_sharing_asm_name) diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 376af85..c7e1100 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -3373,6 +3373,8 @@ lto_main (void) if (!seen_error ()) { + struct varpool_node *vnode; + /* If WPA is enabled analyze the whole call graph and create an optimization plan. Otherwise, read in all the function bodies and continue with optimization. */ @@ -3398,6 +3400,10 @@ lto_main (void) if (flag_lto_report) print_lto_report_1 (); } + + /* Record the global variables. */ + FOR_EACH_DEFINED_VARIABLE (vnode) + vec_safe_push (lto_global_var_decls, vnode->symbol.decl); } /* Here we make LTO pretend to be a parser. */ seem to work.
next prev parent reply other threads:[~2012-11-29 19:09 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-25 22:47 [Bug lto/55466] New: " hjl.tools at gmail dot com 2012-11-26 12:45 ` [Bug lto/55466] " hubicka at ucw dot cz 2012-11-26 15:57 ` rguenth at gcc dot gnu.org 2012-11-26 15:58 ` rguenth at gcc dot gnu.org 2012-11-26 16:36 ` hjl.tools at gmail dot com 2012-11-28 21:26 ` hjl.tools at gmail dot com 2012-11-29 18:53 ` hubicka at gcc dot gnu.org 2012-11-29 19:08 ` hjl.tools at gmail dot com 2012-11-29 19:09 ` hjl.tools at gmail dot com [this message] 2012-12-07 10:43 ` rguenth at gcc dot gnu.org 2012-12-07 13:02 ` hjl.tools at gmail dot com 2012-12-07 18:49 ` hjl.tools at gmail dot com 2012-12-10 14:44 ` hjl at gcc dot gnu.org 2012-12-10 16:40 ` hjl.tools at gmail dot com 2013-01-03 16:55 ` hjl at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-55466-4-b2IEno4BZu@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).