<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:ldionne@apple.com" title="Louis Dionne <ldionne@apple.com>"> <span class="fn">Louis Dionne</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - volatile copy assignment operator for std::atomic"
   href="https://bugs.llvm.org/show_bug.cgi?id=41784">bug 41784</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;">CC</td>
           <td>
                
           </td>
           <td>ldionne@apple.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Fixed By Commit(s)</td>
           <td>
                
           </td>
           <td>c448ea948c28878735fefec734d8326ca2e4b33a
           </td>
         </tr>

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

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - volatile copy assignment operator for std::atomic"
   href="https://bugs.llvm.org/show_bug.cgi?id=41784#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - volatile copy assignment operator for std::atomic"
   href="https://bugs.llvm.org/show_bug.cgi?id=41784">bug 41784</a>
              from <span class="vcard"><a class="email" href="mailto:ldionne@apple.com" title="Louis Dionne <ldionne@apple.com>"> <span class="fn">Louis Dionne</span></a>
</span></b>
        <pre>Should be fixed by <a href="https://reviews.llvm.org/D90968">https://reviews.llvm.org/D90968</a>:

commit c448ea948c28878735fefec734d8326ca2e4b33a
Author: Ruslan Arutyunyan <<a href="mailto:ruslan.arutyunyan@intel.com">ruslan.arutyunyan@intel.com</a>>
Date:   Mon Feb 1 10:12:09 2021 -0500

    [libc++] Fix for the <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - volatile copy assignment operator for std::atomic"
   href="show_bug.cgi?id=41784">Bug 41784</a>

    Add deleted volatile copy-assignment operator in the most derived atomic
    to fix the <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - volatile copy assignment operator for std::atomic"
   href="show_bug.cgi?id=41784">Bug 41784</a>. The root cause: there is an `operator=(T) volatile`
    that has better match than the deleted copy-assignment operator of the base
    class when `this` is `volatile`. The compiler sees that right operand of
    the assignment operator can be converted to `T` and chooses that path
    without taking into account the deleted copy-assignment operator of the
    base class.

    The current behavior on libstdc++ is different from what we have in libc++.
    On the same test compilation fails with libstdc++. Proof:
<a href="https://godbolt.org/z/nebPYd">https://godbolt.org/z/nebPYd</a>
    (everything is the same except the -stdlib option).

    I choose the way with explicit definition of copy-assignment for atomic
    in the most derived class. But probably we can fix that by moving
    `operator=(T)` overloads to the base class from both specializations.
    At first glance, it shouldn't break anything.

    Differential Revision: <a href="https://reviews.llvm.org/D90968">https://reviews.llvm.org/D90968</a></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>