[LLVMbugs] [Bug 10260] New: IRgen assert from instantiating initializer pack expansion with empty pack
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jul 3 22:44:05 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10260
Summary: IRgen assert from instantiating initializer pack
expansion with empty pack
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: rjmccall at apple.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
struct A {};
struct B : public A {};
template <class... T> static void foo(T &&...ts) {
A *printerArray[sizeof...(T) ? sizeof...(T) : 1] = { (&ts)... };
}
void test() {
foo();
}
daysthatwere:trunk glamr$ clang -std=c++0x /tmp/red3.cpp
Assertion failed: (E && hasAggregateLLVMType(E->getType()) && "Invalid
aggregate expression to emit"), function EmitAggExpr, file CGExprAgg.cpp, line
904.
0 clang 0x0000000102025835 PrintStackTrace(void*) + 53
1 clang 0x0000000102025dfb SignalHandler(int) + 379
2 libSystem.B.dylib 0x00007fff8718a66a _sigtramp + 26
3 libSystem.B.dylib 0x0000000000000014 _sigtramp + 2028427716
4 clang 0x000000010004252b raise + 27
5 clang 0x00000001000425ea abort + 26
6 clang 0x00000001000425c4 __assert_rtn + 132
7 clang 0x00000001003127f8
clang::CodeGen::CodeGenFunction::EmitAggExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 184
8 clang 0x00000001002eaec6
clang::CodeGen::CodeGenFunction::EmitExprAsInit(clang::Expr const*,
clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 1190
9 clang 0x00000001002e9a00
clang::CodeGen::CodeGenFunction::EmitAutoVarInit(clang::CodeGen::CodeGenFunction::AutoVarEmission
const&) + 880
10 clang 0x00000001002e6cca
clang::CodeGen::CodeGenFunction::EmitAutoVarDecl(clang::VarDecl const&) + 58
11 clang 0x00000001002e6bc8
clang::CodeGen::CodeGenFunction::EmitVarDecl(clang::VarDecl const&) + 120
12 clang 0x00000001002e6a0b
clang::CodeGen::CodeGenFunction::EmitDecl(clang::Decl const&) + 219
13 clang 0x00000001003bb62f
clang::CodeGen::CodeGenFunction::EmitDeclStmt(clang::DeclStmt const&) + 143
14 clang 0x00000001003b5ba2
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 290
15 clang 0x00000001003b54a1
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 113
16 clang 0x00000001003bb37d
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 445
17 clang 0x00000001003b5b80
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 256
18 clang 0x00000001003b54a1
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 113
19 clang 0x00000001003f2e2c
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&)
+ 172
20 clang 0x00000001003f3205
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 965
21 clang 0x00000001003fdf11
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl)
+ 1297
22 clang 0x00000001003fba76
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 678
23 clang 0x00000001003f8b35
clang::CodeGen::CodeGenModule::EmitDeferred() + 565
24 clang 0x00000001003f8799
clang::CodeGen::CodeGenModule::Release() + 25
25 clang 0x0000000100420d51 (anonymous
namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) + 161
26 clang 0x00000001003f022b
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 139
27 clang 0x0000000100430992 clang::ParseAST(clang::Sema&, bool) +
850
28 clang 0x00000001000ebd0c
clang::ASTFrontendAction::ExecuteAction() + 284
29 clang 0x00000001003eed62 clang::CodeGenAction::ExecuteAction() +
1250
30 clang 0x00000001000eb8c8 clang::FrontendAction::Execute() + 360
31 clang 0x00000001000c5ab6
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1078
32 clang 0x0000000100059e7c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1132
33 clang 0x0000000100045d64 cc1_main(char const**, char const**,
char const*, void*) + 1252
34 clang 0x00000001000533ad main + 701
35 clang 0x0000000100045874 start + 52
36 clang 0x0000000000000026 start + 4294682598
Stack dump:
0. Program arguments: /Volumes/Data/llvm/Debug+Asserts/bin/clang -cc1
-triple x86_64-apple-macosx10.6.7 -emit-obj -mrelax-all -disable-free
-main-file-name red3.cpp -pic-level 1 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 97.17 -resource-dir
/Volumes/Data/llvm/Debug+Asserts/bin/../lib/clang/3.0 -std=c++0x
-fdeprecated-macro -ferror-limit 19 -fmessage-length 85 -stack-protector 1
-fblocks -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o
/var/folders/s9/s96FsWmjFfOmejEGjQKJMU+++TI/-Tmp-/cc-rTiryX.o -x c++
/tmp/red3.cpp
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3. /tmp/red3.cpp:4:35: Generating code for declaration 'foo'
4. /tmp/red3.cpp:4:50: LLVM IR generation of compound statement ('{}')
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list