<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Clang fails to generate code for C11 atomics being returned"
   href="https://bugs.llvm.org/show_bug.cgi?id=39424">39424</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang fails to generate code for C11 atomics being returned
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hugh.a.gallo@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21033" name="attach_21033" title="An example program with the LLVM IR generated for each function">attachment 21033</a> <a href="attachment.cgi?id=21033&action=edit" title="An example program with the LLVM IR generated for each function">[details]</a></span>
An example program with the LLVM IR generated for each function

Clang fails to generate any valid instructions when compiling any function
which returns an atomic_load from an atomic which has been declared and
initialized in that function.

My attachment here is the code which demonstrates the issue, if needed.

clang trunk on godbolt.org also seems to show this issue as well,
<a href="https://godbolt.org/z/o9UCO3">https://godbolt.org/z/o9UCO3</a> for the same example as the attached file.</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>