------- Comment #4 from rguenth at gcc dot gnu dot org  2009-10-03 13:19 -------
We only have one cgraph node for _ZN7DVectoraSERK6Vector in both files,
but its decl isn't the prevailing one!?  The one for the cgraph node
is LDPR_PREEMPTED_IR while the prevailing one is LDPR_PREVAILING_DEF.

It's the first one selected as LDPR_PREVAILING_DEF because of:
addressable used public static weak autoinline QI defer-output file
slufactor.3.ii line 15 col 14 align 16

vs.
addressable used public static weak autoinline QI defer-output file
dvector.3.ii line 15 col 14 align 16

so we go the DECL_WEAK path in get_resolution ().

That is, if we drop a cgraph-node for a decl (because it's not needed)
before streaming out the cgraph we should probably change the cgraph-nodes
decl flag to drop TREE_STATIC and set DECL_EXTERNAL instead.  At least
we have to choose a DECL_WEAK one with a cgraph node to not run into
this PR.

Or completely defer decl merging to after we have read the cgraph so we
can better decide on what to do.  We'd delay
lto_register_deferred_decls_in_symtab until after input_cgraph (not
merging the cgraph therein), and we even can read the summaries without
hitting PR41487.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41552

Reply via email to