<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 - ICE on lambdas returning lambdas 3 deep, when using move or fwd ref"
   href="https://bugs.llvm.org/show_bug.cgi?id=42915">42915</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ICE on lambdas returning lambdas 3 deep, when using move or fwd ref
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>8.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>C++17
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>llvmbugbjorn@fahller.se
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22349" name="attach_22349" title="Example code causing ICE">attachment 22349</a> <a href="attachment.cgi?id=22349&action=edit" title="Example code causing ICE">[details]</a></span>
Example code causing ICE

The attached file crashes clang++-8.0.0, and trunk (367966).

The crashes are on the lines with a comment '// E'. If those lines are
commented out, it compiles.

There are two ways to make it compile. Remove '= std::move(function)' under the
comment '// 1' or remove the forwarding reference '&&' under the comment '// 2'

godbolt link: <a href="https://gcc.godbolt.org/z/DXqN06">https://gcc.godbolt.org/z/DXqN06</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>