[LLVMbugs] [Bug 18494] New: Defaulted default constructor of inner template class - assertion failed
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jan 15 13:00:52 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18494
Bug ID: 18494
Summary: Defaulted default constructor of inner template class
- assertion failed
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: wielkiegie at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
This bug is very similar to PR15458 in that I get the same error message.
However, what causes the problem seems to be the use of templates.
Additionally, the workaround from PR15458 (explicitly defining Inner's
constructor) causes assertion failure.
struct Outer {
Outer();
template <typename T>
struct Inner {
Inner() {} // Commenting this line prevents ICE.
int x = 1337;
};
Inner<int> inner;
};
Outer::Outer() {}
$ clang -std=c++11 llvm-crash.cpp -c
clang: /home/bigos/src/llvm/build/include/llvm/Support/Casting.h:97: static
bool llvm::isa_impl_cl<clang::BinaryOperator, const clang::Stmt *>::doit(const
>From *) [To = clang::BinaryOperator, From = const clang::Stmt *]: Assertion
`Val && "isa<> used on a null pointer"' failed.
0 clang 0x0000000003577d9e llvm::sys::PrintStackTrace(_IO_FILE*) +
46
1 clang 0x000000000357807b
2 clang 0x000000000357959a
3 libpthread.so.0 0x00007f9b6b002bb0
4 libc.so.6 0x00007f9b6a23ff77 gsignal + 55
5 libc.so.6 0x00007f9b6a2435e8 abort + 328
6 libc.so.6 0x00007f9b6a238d43
7 libc.so.6 0x00007f9b6a238df2
8 clang 0x0000000000956c5e
9 clang 0x0000000000956c08
10 clang 0x0000000000956be2
11 clang 0x0000000000956b35
12 clang 0x00000000009244c8
13 clang 0x0000000000da0c74
14 clang 0x0000000000d95c88
15 clang 0x0000000000da5a27
16 clang 0x0000000000da158c
17 clang 0x0000000000d95c88
18 clang 0x0000000000d95c0d
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 189
19 clang 0x0000000000d40fa1
clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*,
clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 97
20 clang 0x0000000000d43c39
clang::CodeGen::CodeGenFunction::EmitExprAsInit(clang::Expr const*,
clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 569
21 clang 0x0000000000d29e1a
clang::CodeGen::CodeGenFunction::EmitInitializerForField(clang::FieldDecl*,
clang::CodeGen::LValue, clang::Expr*, llvm::ArrayRef<clang::VarDecl*>) + 330
22 clang 0x0000000000d33da1
23 clang 0x0000000000d2c248
24 clang 0x0000000000d2bac5
clang::CodeGen::CodeGenFunction::EmitCtorPrologue(clang::CXXConstructorDecl
const*, clang::CXXCtorType, clang::CodeGen::FunctionArgList&) + 917
25 clang 0x0000000000d2b112
clang::CodeGen::CodeGenFunction::EmitConstructorBody(clang::CodeGen::FunctionArgList&)
+ 562
26 clang 0x0000000000c412ab
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 955
27 clang 0x0000000000d10349
clang::CodeGen::CodeGenModule::EmitCXXConstructor(clang::CXXConstructorDecl
const*, clang::CXXCtorType) + 425
28 clang 0x0000000000c53c82
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 306
29 clang 0x0000000000c4f2a8
clang::CodeGen::CodeGenModule::EmitDeferred() + 376
30 clang 0x0000000000c4ee79 clang::CodeGen::CodeGenModule::Release()
+ 25
31 clang 0x0000000000bbb401
32 clang 0x0000000000bb9722
33 clang 0x0000000000e3932d clang::ParseAST(clang::Sema&, bool, bool)
+ 813
34 clang 0x00000000008d2619 clang::ASTFrontendAction::ExecuteAction()
+ 345
35 clang 0x0000000000bb9081 clang::CodeGenAction::ExecuteAction() +
1553
36 clang 0x00000000008d1dff clang::FrontendAction::Execute() + 191
37 clang 0x000000000089c90e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 798
38 clang 0x000000000085d39c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1036
39 clang 0x000000000084aa8a cc1_main(char const**, char const**, char
const*, void*) + 698
40 clang 0x00000000008570c2 main + 802
41 libc.so.6 0x00007f9b6a22ade5 __libc_start_main + 245
42 clang 0x000000000084a704
"clang" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all
-disable-free -main-file-name llvm-crash.cpp -mrelocation-model static
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version
2.23.52.20130913 -std=c++11 -fdeprecated-macro -ferror-limit 19
-fmessage-length 220 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -vectorize-slp -x c++
llvm-crash-5a7be9.cpp
This particular problem occurs on clang 3.2, 3.3 and trunk.
--
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/20140115/6b256e6c/attachment.html>
More information about the llvm-bugs
mailing list