D-Programming-Language/dmd — pull request #2254 by rainers (2013-06-24 06:56:06+00:00)
Title: Win64: fix bad merging of non-COMDAT data into COMDAT segment

I don't have an easy test case for this, but I guess this is the main reason why the phobos unittests are mostly disabled for Win64 (see unittest.d).

The problem is that if the first segment created for tls is actually a COMDAT segment (say with symbol S), all non-COMDAT data is merged into this segment. If another object file defines the same symbol S, but without or other non-COMDAT data, the additional data might be discarded by the "pick-any" strategy.