<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 - Assertion `!isa<ConstantExpr>(E)' failed"
href="https://bugs.llvm.org/show_bug.cgi?id=47699">47699</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion `!isa<ConstantExpr>(E)' failed
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>enhancement
</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>pickensd@synopsys.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=24012" name="attach_24012" title="Test case">attachment 24012</a> <a href="attachment.cgi?id=24012&action=edit" title="Test case">[details]</a></span>
Test case
clang crashes when the attached file is compiled in c++17 mode:
clang -std=c++17 CrashTest.cpp
clang-10: .../working/llvm-project/clang/lib/AST/Expr.cpp:285: static
clang::ConstantExpr* clang::ConstantExpr::Create(const clang::ASTContext&,
clang::Expr*, clang::ConstantExpr::ResultStorageKind): Assertion
`!isa<ConstantExpr>(E)' failed.
Stack dump:
0. Program arguments: .../working/llvm-project/BUILD/bin/clang-10 -cc1
-triple x86_64 -emit-obj -mrelax-all -disable-free -main-file-name
CrashTest.cpp -mrelocation-model static -mthread-model posix
-mframe-pointer=all -fmath-errno -fno-rounding-math -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -dwarf-column-info
-fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir
.../working/llvm-project/BUILD/lib/clang/10.0.1 -std=c++17 -fdeprecated-macro
-fdebug-compilation-dir ... -ferror-limit 19 -fmessage-length 0
-fgnuc-version=4.2.1 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -faddrsig -o
/tmp/CrashTest-053b7b.o -x c++ CrashTest.cpp
1. CrashTest.cpp:2775:47: current parser token ';'
2. CrashTest.cpp:2772:12: parsing function body 'main'
3. CrashTest.cpp:2772:12: in compound statement ('{}')
4. CrashTest.cpp:1666:7: instantiating class definition
'boost::ext::sml::v1_1_3::back::sm<boost::ext::sml::v1_1_3::back::sm_policy<SmDefinition<AnyStruct>>
<span class="quote">>'</span >
5. CrashTest.cpp:2764:10: instantiating function definition
'SmDefinition<AnyStruct>::operator()'</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>