<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 crashed during compilation - template recursive constexpr function"
   href="https://bugs.llvm.org/show_bug.cgi?id=42581">42581</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang crashed during compilation - template recursive constexpr function
          </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++14
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>vukki.starborn@gmail.com
          </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=22223" name="attach_22223" title="source,full backtrace and other data">attachment 22223</a> <a href="attachment.cgi?id=22223&action=edit" title="source,full backtrace and other data">[details]</a></span>
source,full backtrace and other data

clang crashed during compilation - template recursive constexpr function

full backtrace and other data are in the attachment.
source:

template <int n> constexpr int f()
{
return n<=1 ? 1: (n*f<n-1>());  
}

template <int l>
struct cti
{
};

int main(int argc,char * argv[])
{
    cti<f<3>()> l;
    return 0;
}

backtrace's end:
#251 0x00007f355c6df876 (/usr/bin/../lib64/../lib64/libclangSema.so.8+0x61f876)
#252 0x00007f355c6cd42a clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&)
(/usr/bin/../lib64/../lib64/libclangSema.so.8+0x60d42a)
#253 0x00007f355c6fd106
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool, bool)
(/usr/bin/../lib64/../lib64/libclangSema.so.8+0x63d106)
#254 0x00007f355c4400f3
clang::Sema::MarkFunctionReferenced(clang::SourceLocation,
clang::FunctionDecl*, bool)
(/usr/bin/../lib64/../lib64/libclangSema.so.8+0x3800f3)
#255 0x00007f355c4434ee (/usr/bin/../lib64/../lib64/libclangSema.so.8+0x3834ee)
clang-8.0: error: unable to execute command: Segmentation fault (core dumped)
clang-8.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0 (tags/RELEASE_800/final 356365)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-8.0: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.</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>