[llvm-bugs] [Bug 32034] Assert-on-valid: "temporary created multiple times"
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 22 14:21:10 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=32034
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Richard Smith <richard-llvm at metafoo.co.uk> ---
This was broken before the constexpr if changes; it's failing now due to a
change in stack layout. The problem is that AtomicExprEvaluator does this:
bool ZeroInitialization(const Expr *E) {
ImplicitValueInitExpr VIE(
E->getType()->castAs<AtomicType>()->getValueType());
return Evaluate(Result, Info, &VIE);
}
... but Evaluate uses the Expr* as a key in a map when it's creating a class
temporary. Somewhat more reduced testcase:
struct B {};
struct C { _Atomic(B) c; };
constexpr int n = (C(), C(), 0);
Fixed by r295886.
--
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/20170222/cd97b074/attachment.html>
More information about the llvm-bugs
mailing list