This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] (partially) fix lto bootstrap (PR bootstrap/48148)


Hi!

richi's lto-cgraph.c change actually didn't do anything, because
DECL_ABSTRACT_ORIGIN is still NULL there, see PR for details.
This patch instead doesn't try to force dies for DECL_ABSTRACT_ORIGIN
DECL_EXTERNAL decls, as dwarf2out isn't prepared to handle them.

Bootstrapped/regtested on x86_64-linux and i686-linux,
attempted also LTO bootstrap, but it failed in other unrelated
places (x86_64 somewhere in Ada and i686 because it was trying
to emit .Ldebug_info0 twice).  I'll try to look at those later,
but this is a step forward, approved on IRC by rth.

2011-04-01  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/48148
	* dwarf2out.c (resolve_addr): Don't call force_decl_die
	if DECL_EXTERNAL has non-NULL DECL_ABSTRACT_ORIGIN.

	Revert:
	2011-03-17  Richard Guenther  <rguenther@suse.de>

	PR bootstrap/48148
	* lto-cgraph.c (input_overwrite_node): Clear the abstract
	origin for decls in other ltrans units.
	(input_varpool_node): Likewise.

--- gcc/dwarf2out.c.jj	2011-04-01 11:04:36.000000000 +0200
+++ gcc/dwarf2out.c	2011-04-01 18:08:30.864796302 +0200
@@ -23023,7 +23023,9 @@ resolve_addr (dw_die_ref die)
 	  {
 	    tree tdecl = SYMBOL_REF_DECL (a->dw_attr_val.v.val_addr);
 	    dw_die_ref tdie = lookup_decl_die (tdecl);
-	    if (tdie == NULL && DECL_EXTERNAL (tdecl))
+	    if (tdie == NULL
+		&& DECL_EXTERNAL (tdecl)
+		&& DECL_ABSTRACT_ORIGIN (tdecl) == NULL_TREE)
 	      {
 		force_decl_die (tdecl);
 		tdie = lookup_decl_die (tdecl);
--- gcc/lto-cgraph.c.jj	2011-03-17 16:20:09.000000000 +0100
+++ gcc/lto-cgraph.c	2011-04-01 18:02:37.570845862 +0200
@@ -975,7 +975,6 @@ input_overwrite_node (struct lto_file_de
 	  || node->clone_of->decl != node->decl))
     {
       DECL_EXTERNAL (node->decl) = 1;
-      DECL_ABSTRACT_ORIGIN (node->decl) = NULL_TREE;
       TREE_STATIC (node->decl) = 0;
     }
   node->alias = bp_unpack_value (bp, 1);
@@ -1147,7 +1146,6 @@ input_varpool_node (struct lto_file_decl
   if (node->in_other_partition)
     {
       DECL_EXTERNAL (node->decl) = 1;
-      DECL_ABSTRACT_ORIGIN (node->decl) = NULL_TREE;
       TREE_STATIC (node->decl) = 0;
     }
   aliases_p = bp_unpack_value (&bp, 1);

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]