<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 EST != EST_Unevaluated && EST != EST_Uninstantiated with destructor and uniform initialization"
href="http://llvm.org/bugs/show_bug.cgi?id=21449">21449</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion EST != EST_Unevaluated && EST != EST_Uninstantiated with destructor and uniform initialization
</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>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jonathan.sauer@gmx.de
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=13271" name="attach_13271" title="log of clang execution">attachment 13271</a> <a href="attachment.cgi?id=13271&action=edit" title="log of clang execution">[details]</a></span>
log of clang execution
The following code crashes clang r220759 with an assertion:
struct Bar {
Bar();
~Bar();
};
struct Foo {
Bar a, b;
};
Foo* makeFoo()
{
return new Foo {
/*Bar*/{ },
/*Bar*/{ }
};
}
This results in (full log attached):
% ~/LLVM/build/Release+Asserts/bin/clang++ -std=c++11 -c clang.cpp
Assertion failed: (EST != EST_Unevaluated && EST != EST_Uninstantiated),
function isNothrow, file
/Users/rynnsauer/LLVM/llvm/tools/clang/lib/AST/Type.cpp, line 1701.
0 clang 0x000000010f157f0f
llvm::sys::PrintStackTrace(__sFILE*) + 47
1 clang 0x000000010f15872b SignalHandler(int) + 555
2 libsystem_platform.dylib 0x00007fff8ffe35aa _sigtramp + 26
3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1879165552
4 clang 0x000000010f1584e6 abort + 22
5 clang 0x000000010f1584c1 __assert_rtn + 81
6 clang 0x000000010e4764f0
clang::FunctionProtoType::isNothrow(clang::ASTContext const&, bool) const + 256
7 clang 0x000000010d722130
clang::CodeGen::CodeGenModule::ConstructAttributeList(clang::CodeGen::CGFunctionInfo
const&, clang::Decl const*, llvm::SmallVector<llvm::AttributeSet, 8u>&,
unsigned int&, bool) + 528
8 clang 0x000000010d831af7
clang::CodeGen::CodeGenModule::SetFunctionAttributes(clang::GlobalDecl,
llvm::Function*, bool) + 199
9 clang 0x000000010d833d1b
clang::CodeGen::CodeGenModule::GetOrCreateLLVMFunction(llvm::StringRef,
llvm::Type*, clang::GlobalDecl, bool, bool, llvm::AttributeSet) + 523
10 clang 0x000000010d71b7fb
clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(clang::CXXMethodDecl
const*, clang::CodeGen::StructorType, clang::CodeGen::CGFunctionInfo const*,
llvm::FunctionType*, bool) + 283
11 clang 0x000000010d882f32 (anonymous
namespace)::ItaniumCXXABI::EmitDestructorCall(clang::CodeGen::CodeGenFunction&,
clang::CXXDestructorDecl const*, clang::CXXDtorType, bool, bool, llvm::Value*)
+ 258
[...]
Doing one of the following will make the crash disappear:
- Removing Bar's destructor.
- Changing makeFoo's return type from Foo* to Foo.
- Uncommenting one or both of the Bar's inside makeFoo.
This bug is similar to <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Assertion failed: (EST != EST_Unevaluated && EST != EST_Uninstantiated), function isNothrow, file /Users/ldionne/code/llvm/tools/clang/lib/AST/Type.cpp, line 1699."
href="show_bug.cgi?id=20619">bug 20619</a>: The same assertion is triggered, however not
in the context of a lambda function.</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>