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] Fix lto-bootstrap issue (one of them)


The following fixes the TREE_ADDRESSABLE issue during LTO bootstrap.
We fail to merge all symbols because 'first' may no longer be 'first'.

Committed as obvious.  LTO bootstrap is still broken for me:

/tmp/ccXpATTw.ltrans19.ltrans.o: In function `is_ctor_or_dtor.17240':
ccXpATTw.ltrans19.o:(.text+0x133): undefined reference to `alloca'
ccXpATTw.ltrans19.o:(.text+0x147): undefined reference to `alloca'
/tmp/ccXpATTw.ltrans19.ltrans.o: In function `d_demangle_callback.17277':
ccXpATTw.ltrans19.o:(.text+0x1495): undefined reference to `alloca'
ccXpATTw.ltrans19.o:(.text+0x14b8): undefined reference to `alloca'
collect2: error: ld returned 1 exit status

I'll try updating binutils (but I don't see how alloca calls
should survive!?  both of the above is for cp-demangle.c of libiberty).

Richard.

2012-09-25  Richard Guenther  <rguenther@suse.de>

	* lto-symtab.c (lto_symtab_merge_decls_1): Properly merge
	all of the chain.

Index: gcc/lto-symtab.c
===================================================================
--- gcc/lto-symtab.c	(revision 191696)
+++ gcc/lto-symtab.c	(working copy)
@@ -566,12 +566,12 @@ lto_symtab_merge_decls_1 (symtab_node fi
 
   /* Merge the chain to the single prevailing decl and diagnose
      mismatches.  */
-  lto_symtab_merge_decls_2 (first, diagnosed_p);
+  lto_symtab_merge_decls_2 (prevailing, diagnosed_p);
 
   if (cgraph_dump_file)
     {
       fprintf (cgraph_dump_file, "After resolution:\n");
-      for (e = first; e; e = e->symbol.next_sharing_asm_name)
+      for (e = prevailing; e; e = e->symbol.next_sharing_asm_name)
 	dump_symtab_node (cgraph_dump_file, e);
     }
 


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