This is the mail archive of the 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: [Darwin] Patch, take 2: enable linkonce support for Darwin

Hi Matt,

> But a general comment: this is exactly the sort of reason I wanted to
> redo coalescing, design it  more carefully, and get it into the GNU
> compiler.  I want to make sure that this is well tested, that it's
> reviewed by people outside Apple, and that it's not a set of ad hoc
> patches that have to get redone every time Apple does an import from
> the GNU repository.  If I introduce any coalescing bugs in the GNU
> mainline, I'll fix them. Apple quite aware that coalescing has been
> less reliable than it ought to be, and that's exactly what this is
> supposed to address.

Undestood.  We do have a (very large!) testcase and if and when this patch is 
approved and committed to mainline, I will build it on MacOSX and try our 
testcase and let you know if any problems are detected.

> (The reason you didn't see coalescing bugs in the mainline Darwin
> compiler is that it didn't have linkonce semantics at all. When you
> instantiated a template in multiple translation units, you'd get
> separate copies in each ones.  This breaks an awful lot of things.
> Linkonce semantics aren't just an optimization, they're required for
> correctness.)

Thanks for explaining that.  I did not realize that the current GNU Darwin 
compiler was considered "broken" in that regard.  The funny thing is STLport 
uses lots of templates instantiated in different modules but GNU Darwin 
passed the stlport tests with flying colors.  I guess the tests simply did 
not detect the fact that separate copies were being generated.


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