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

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2011-07-05 
20:41:17 UTC ---
The C++ linkage scheme has been to set DECL_EXTERN on comdat stuff until EOF,
at which point we decide whether or not to emit them and whether they should be
public or not.  We need to do this for targets that don't support
weak/linkonce.

We have historically used DECL_EXTERNAL rather than just DECL_DEFER_OUTPUT in
order to support targets that need assemble_external.

Perhaps this can be simplified somewhat now that we're always unit-at-a-time; I
imagine we could give everything the real flags during compilation and then
change them to be external or non-public at EOF, before handing off to cgraph
finalization.  But I'm concerned about the churn causing breakage on obscure
targets.

With regard to this specific issue, I believe that we do unset DECL_EXTERNAL on
things that get mark_needed, usually right after the call.  I'll check on that.

Reply via email to