http://llvm.org/bugs/show_bug.cgi?id=20046
Bug ID: 20046
Summary: Segfault when using a variable template initialized by
a lambda inside a lambda
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++1y
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 12661
--> http://llvm.org/bugs/attachment.cgi?id=12661&action=edit
Test cases with comments
Hi,
The following code causes a segmentation fault on Clang r210972:
------------------------------------------------------------------------------
template <typename ...Anything>
auto variable_template = [] { return 1; }();
int main() {
auto f = [](auto) { return variable_template<>; };
f(1);
}
------------------------------------------------------------------------------
The error message is (no stack trace; see the attached test cases):
------------------------------------------------------------------------------
clang-3.5: error: unable to execute command: Segmentation fault: 11
clang-3.5: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5.0
Target: x86_64-apple-darwin13.2.0
Thread model: posix
clang-3.5: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.5: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.5: note: diagnostic msg:
/var/folders/1t/g6fmf1h52nq1b6k9gnv600xc0000gn/T/worksheet-07b61d.cpp
clang-3.5: note: diagnostic msg:
/var/folders/1t/g6fmf1h52nq1b6k9gnv600xc0000gn/T/worksheet-07b61d.sh
clang-3.5: note: diagnostic msg:
********************
------------------------------------------------------------------------------
The exact command line is:
~/code/llvm/build/bin/clang++ -std=c++1y -o /dev/null
~/desktop/bugreport/worksheet.cpp
I also attached a couple of test cases with comments.
Regards,
Louis Dionne
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs