This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/60060] [4.9 Regression] lto1: internal compiler error: in add_AT_specification, at dwarf2out.c:4096
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Feb 2014 15:41:02 +0000
- Subject: [Bug fortran/60060] [4.9 Regression] lto1: internal compiler error: in add_AT_specification, at dwarf2out.c:4096
- Auto-submitted: auto-generated
- References: <bug-60060-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60060
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
wrapup_global_declarations looks like it's a no-op in LTO (DECL_DEFER_OUTPUT
is always false). I am testing the following which avoids (re-)outputting
debuginfo for local statics.
Index: gcc/lto/lto-lang.c
===================================================================
--- gcc/lto/lto-lang.c (revision 207658)
+++ gcc/lto/lto-lang.c (working copy)
@@ -1082,17 +1082,11 @@ lto_write_globals (void)
if (flag_wpa)
return;
- /* Record the global variables. */
- vec<tree> lto_global_var_decls = vNULL;
+ /* Output debug info for global variables. */
varpool_node *vnode;
FOR_EACH_DEFINED_VARIABLE (vnode)
- lto_global_var_decls.safe_push (vnode->decl);
-
- tree *vec = lto_global_var_decls.address ();
- int len = lto_global_var_decls.length ();
- wrapup_global_declarations (vec, len);
- emit_debug_global_declarations (vec, len);
- lto_global_var_decls.release ();
+ if (!decl_function_context (vnode->decl))
+ debug_hooks->global_decl (vnode->decl);
}
static tree