<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 - Constexpr new: compiler crash"
href="https://bugs.llvm.org/show_bug.cgi?id=43629">43629</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Constexpr new: compiler crash
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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++2a
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zamazan4ik@tut.by
</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>I am trying to make std::list constexpr in libc++. I have built clang from
trunk, patched libc++ and prepared the example on which clang crashes.
Clang diagnostic message:
Stack dump:
0. Program arguments:
/home/zamazan4ik/OpenSource/LLVM_build_release_clang/install/bin/clang-10 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name main.cpp -mrelocation-model static
-mthread-model posix -mframe-pointer=none -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debugger-tuning=gdb -nostdinc++ -resource-dir
/home/zamazan4ik/OpenSource/LLVM_build_release_clang/install/lib/clang/10.0.0
-I /home/zamazan4ik/OpenSource/LLVM_build_release_clang/install/include/c++/v1
-D NDEBUG -internal-isystem /usr/local/include -internal-isystem
/home/zamazan4ik/OpenSource/LLVM_build_release_clang/install/lib/clang/10.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-std=gnu++2a -fdeprecated-macro -fdebug-compilation-dir
/home/zamazan4ik/OpenSource/test_llvm_lib/cmake-build-trunkclang -ferror-limit
19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-faddrsig -o CMakeFiles/test_llvm_lib.dir/main.cpp.o -x c++
/home/zamazan4ik/OpenSource/test_llvm_lib/main.cpp
1. /home/zamazan4ik/OpenSource/test_llvm_lib/main.cpp:11:16: current
parser token ';'
2. /home/zamazan4ik/OpenSource/test_llvm_lib/main.cpp:5:1: parsing
function body 'main'
3. /home/zamazan4ik/OpenSource/test_llvm_lib/main.cpp:5:1: in compound
statement ('{}')
clang-10: error: unable to execute command: Segmentation fault (core dumped)
clang-10: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 10.0.0 (<a href="mailto:git@github.com">git@github.com</a>:ZaMaZaN4iK/llvm-project.git
067655d7e48d69df23370dbeea20e9ca5620bbc4)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/zamazan4ik/OpenSource/LLVM_build_release_clang/install/bin
clang-10: 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.
clang-10: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-10: note: diagnostic msg: /tmp/main-197fef.cpp
clang-10: note: diagnostic msg: /tmp/main-197fef.sh
clang-10: note: diagnostic msg:
********************
Added required attachments with preprocessed file and run script.
One detail which can help: I got ICE after commenting this line:
<a href="https://github.com/ZaMaZaN4iK/llvm-project/blob/feature/list_constexpr/libcxx/include/list#L1151">https://github.com/ZaMaZaN4iK/llvm-project/blob/feature/list_constexpr/libcxx/include/list#L1151</a>
If you will uncomment this line - will be compiler error (something about
lifetimes - I am not sure what it is).</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>