<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:yaron.keren@gmail.com" title="Yaron Keren <yaron.keren@gmail.com>"> <span class="fn">Yaron Keren</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - missing comdats for static initializers in template and guard variables"
   href="https://llvm.org/bugs/show_bug.cgi?id=23472">bug 23472</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>FIXED
           </td>
           <td>---
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - missing comdats for static initializers in template and guard variables"
   href="https://llvm.org/bugs/show_bug.cgi?id=23472#c14">Comment # 14</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - missing comdats for static initializers in template and guard variables"
   href="https://llvm.org/bugs/show_bug.cgi?id=23472">bug 23472</a>
              from <span class="vcard"><a class="email" href="mailto:yaron.keren@gmail.com" title="Yaron Keren <yaron.keren@gmail.com>"> <span class="fn">Yaron Keren</span></a>
</span></b>
        <pre>You are right, I tested on a local patched copy that disables on COFF as
dicussed earlier:

     // The ABI says: It is suggested that it be emitted in the same COMDAT
group
     // as the associated data object
     llvm::Comdat *C = var->getComdat();
-    if (!D.isLocalVarDecl() && C) {
+    if (!CGM.getTarget().getTriple().isOSBinFormatCOFF() &&
+        !D.isLocalVarDecl() && C) {
       guard->setComdat(C);
       CGF.CurFn->setComdat(C);
     } else if (CGM.supportsCOMDAT() && guard->isWeakForLinker()) {

Thanks for noticing!</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>