<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 failed: Result.isUninit() && "temporary created multiple times", file ExprConstant.cpp, line 1107"
href="https://bugs.llvm.org/show_bug.cgi?id=33140">33140</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion failed: Result.isUninit() && "temporary created multiple times", file ExprConstant.cpp, line 1107
</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>Windows NT
</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++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>russell_gallop@sn.scee.net
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>These are two cases found in internal testing. They hit the same assertion but
were introduced at different times, presumably by related commits.
$ cat testa.cpp
// ========================
struct S {
constexpr S(const int &a = 0) {}
};
void foo(void) {
S s[2] = {};
}
// =======================
$ clang -c testa.cpp -std=c++11
Assertion failed: Result.isUninit() && "temporary created multiple times", file
<...>\ExprConstant.cpp, line 1107
Bisects to:
commit f83586caa9df7ebae5226227614513df4af4b402
Author: Nick Lewycky <<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>>
Date: Sat Apr 29 09:33:46 2017 +0000
Remove Sema::CheckForIntOverflow, and instead check all full-expressions.
CheckForIntOverflow used to implement a whitelist of top-level expressions
to
send to the constant expression evaluator, which handled many more
expressions
than the CheckForIntOverflow whitelist did.
git-svn-id: <a href="https://llvm.org/svn/llvm-project/cfe/trunk@301742">https://llvm.org/svn/llvm-project/cfe/trunk@301742</a>
91177308-0d34-0410-b5e6-96231b3b80d8
$ cat testb.cpp
// ==============================================================
bool bar(float const &f = 0);
bool foo() { return bar() && bar(); }
// ==============================================================
$ clang -c testb.cpp
Assertion failed: Result.isUninit() && "temporary created multiple times", file
<...>\ExprConstant.cpp, line 1107
Bisects to:
commit 750306071663247152ab611f63e1d97ec175786d
Author: Nick Lewycky <<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>>
Date: Wed May 17 23:56:54 2017 +0000
The constant expression evaluator should examine function arguments for
non-constexpr function calls unless the EvalInfo says to stop.
git-svn-id: <a href="https://llvm.org/svn/llvm-project/cfe/trunk@303317">https://llvm.org/svn/llvm-project/cfe/trunk@303317</a>
91177308-0d34-0410-b5e6-96231b3b80d8</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>