This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/54709] [4.8 Regression] r191713 breaks Firefox build
- 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: Wed, 26 Sep 2012 13:47:02 +0000
- Subject: [Bug lto/54709] [4.8 Regression] r191713 breaks Firefox build
- Auto-submitted: auto-generated
- References: <bug-54709-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54709
--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-26 13:47:02 UTC ---
Index: gcc/lto-symtab.c
===================================================================
--- gcc/lto-symtab.c (revision 191756)
+++ gcc/lto-symtab.c (working copy)
@@ -326,11 +326,7 @@ lto_symtab_resolve_symbols (symtab_node
for (e = first; e; e = e->symbol.next_sharing_asm_name)
{
if (!lto_symtab_resolve_can_prevail_p (e))
- {
- e->symbol.resolution = LDPR_RESOLVED_IR;
- set_resolution_guessed (e, true);
- continue;
- }
+ continue;
/* Set a default resolution - the final prevailing one will get
adjusted later. */
@@ -387,9 +383,25 @@ lto_symtab_resolve_symbols (symtab_node
}
if (!prevailing)
- return;
+ {
+ /* There was no prevailing definition - adjust the symbol resolutions
+ according to that. */
+ for (e = first; e; e = e->symbol.next_sharing_asm_name)
+ e->symbol.resolution = LDPR_UNDEF;
+ return;
+ }
found:
+ /* We found a prevailing definition - adjust the pre-empted symbols
+ resolutions. */
+ for (e = first; e; e = e->symbol.next_sharing_asm_name)
+ {
+ if (!lto_symtab_resolve_can_prevail_p (e))
+ {
+ e->symbol.resolution = LDPR_RESOLVED_IR;
+ set_resolution_guessed (e, true);
+ }
+ }
/* If current lto files represent the whole program,
it is correct to use LDPR_PREVALING_DEF_IRONLY.
If current lto files are part of whole program, internal
fixes the testcase for me.