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]

Re: [LTO] Question about comdat linkage of implicit ctor and dtor.


Hi,

2008/11/21 Mark Mitchell <mark@codesourcery.com>:

> I don't think that's true.  The linkage of the constructor or destructor
> cannot be determined until the linkage of the class as a whole is
> determined, and we might not know that until later in the file.
> However, it certainly can be determined at the end of the translation
> unit.  And, if we're generating implicit constructors in implicitly
> instantiated template classes, without marking them as having vague
> linkage, that certainly sounds like a bug.  However, I'd think it would
> also show up without LTO when not optimizing, as that would result in
> multiple definitions at link-time.

The destructors in question were not emitted but reachable via BINFOs.
 Before Rafael checked in his BINFO removal patch, the virtual
desctructors were still visible in LTO output file.  After Rafael's
patch, we still see this problem and I am look at that.

Since we can determine vague linkage at the end-of-file, I guess it is
okay to make decision for all functions DECLs in free_lang_specific,
when we have read the whole file and right before we forget all FE
specific information.

-Doug


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