[llvm-bugs] [Bug 42581] New: clang crashed during compilation - template recursive constexpr function
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 11 04:00:40 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42581
Bug ID: 42581
Summary: clang crashed during compilation - template recursive
constexpr function
Product: clang
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangbugs at nondot.org
Reporter: vukki.starborn at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
Created attachment 22223
--> https://bugs.llvm.org/attachment.cgi?id=22223&action=edit
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
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190711/82653767/attachment.html>
More information about the llvm-bugs
mailing list