]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/60060 (lto1: internal compiler error: in add_AT_specification, at dwarf...
authorRichard Biener <rguenther@suse.de>
Wed, 12 Feb 2014 09:01:30 +0000 (09:01 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 12 Feb 2014 09:01:30 +0000 (09:01 +0000)
2014-02-12  Richard Biener  <rguenther@suse.de>

PR lto/60060
* lto-lang.c (lto_write_globals): Do not call
wrapup_global_declarations or emit_debug_global_declarations
but emit debug info for non-function scope variables
directly.

From-SVN: r207715

gcc/lto/ChangeLog
gcc/lto/lto-lang.c

index 94d19ee78bc78ce2a989f9c1ec49418153d79b24..1b55d3efd73e57c3bef8e082d802e9cc57ebabb4 100644 (file)
@@ -1,3 +1,11 @@
+2014-02-12  Richard Biener  <rguenther@suse.de>
+
+       PR lto/60060
+       * lto-lang.c (lto_write_globals): Do not call
+       wrapup_global_declarations or emit_debug_global_declarations
+       but emit debug info for non-function scope variables
+       directly.
+
 2014-02-06  Jan Hubicka  <hubicka@ucw.cz>
 
        * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
index 4d6d0f5ffd9d388e96da0fca3b659085939bc073..28eac6f3e9f7a7f1f9d00e4c7b8322d77f279ece 100644 (file)
@@ -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