[LLVMbugs] [Bug 10582] New: ICE on int main(){int a=0?0:throw 0;}
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Aug 3 17:41:43 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10582
Summary: ICE on int main(){int a=0?0:throw 0;}
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: timon.gehr at gmx.ch
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
$ clang -v
clang version 3.0 (trunk 133404)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ echo "int main(){int a=0?0:throw 0;}" > tt.cpp
$ clang tt.cpp
0 clang 0x0000000001a9319f
1 clang 0x0000000001a95412
2 libpthread.so.0 0x00007f7f28ca18f0
3 clang 0x00000000019f08bd llvm::Value::getContext() const + 13
4 clang 0x00000000019ad35d llvm::StoreInst::StoreInst(llvm::Value*,
llvm::Value*, bool, llvm::Instruction*) + 61
5 clang 0x0000000000848196
clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(llvm::Value*, llvm::Value*,
bool, unsigned int, clang::QualType, llvm::MDNode*) + 118
6 clang 0x000000000084b8d8
clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(clang::CodeGen::RValue,
clang::CodeGen::LValue, clang::QualType) + 424
7 clang 0x0000000000833bf3
clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*,
clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 515
8 clang 0x0000000000834999
clang::CodeGen::CodeGenFunction::EmitExprAsInit(clang::Expr const*,
clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 633
9 clang 0x000000000083569d
clang::CodeGen::CodeGenFunction::EmitAutoVarInit(clang::CodeGen::CodeGenFunction::AutoVarEmission
const&) + 1197
10 clang 0x00000000008385fa
clang::CodeGen::CodeGenFunction::EmitAutoVarDecl(clang::VarDecl const&) + 42
11 clang 0x00000000008d1b3f
clang::CodeGen::CodeGenFunction::EmitDeclStmt(clang::DeclStmt const&) + 127
12 clang 0x00000000008d74b5
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 101
13 clang 0x00000000008d75a7
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 39
14 clang 0x00000000008daab0
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 272
15 clang 0x00000000008d755f
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 271
16 clang 0x00000000008d75a7
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 39
17 clang 0x00000000008fcd5e
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 702
18 clang 0x00000000007e40d5
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl)
+ 789
19 clang 0x00000000007e4deb
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 619
20 clang 0x00000000007e519d
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 909
21 clang 0x00000000007e5701
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 449
22 clang 0x00000000007d6e24
23 clang 0x00000000007d6801
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 161
24 clang 0x0000000000917de4 clang::ParseAST(clang::Sema&, bool) + 292
25 clang 0x00000000007d5c54 clang::CodeGenAction::ExecuteAction() +
68
26 clang 0x00000000006bdc03
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 371
27 clang 0x0000000000694d17
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1319
28 clang 0x000000000068ad58 cc1_main(char const**, char const**, char
const*, void*) + 760
29 clang 0x0000000000693ba0 main + 7040
30 libc.so.6 0x00007f7f27f7bc4d __libc_start_main + 253
31 clang 0x0000000000689f39
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
tt.cpp -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -momit-leaf-frame-pointer -resource-dir /usr/local/bin/../lib/clang/3.0
-fdeprecated-macro -ferror-limit 19 -fmessage-length 157 -fcxx-exceptions
-fexceptions -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/cc-zmm2Lz.o -x c++ tt.cpp
1. <eof> parser at end of file
2. tt.cpp:4:5: LLVM IR generation of declaration 'main'
3. tt.cpp:4:5: Generating code for declaration 'main'
4. tt.cpp:4:11: LLVM IR generation of compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
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