[LLVMbugs] [Bug 15786] New: Frontend crash, assertion in Attributes.cpp

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 18 12:21:46 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15786

            Bug ID: 15786
           Summary: Frontend crash, assertion in Attributes.cpp
           Product: clang
           Version: 3.2
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bhiggins at arbor.net
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

eng-6-20:cpp_primes bhiggins$ clang++ ./main.cc -o main
Assertion failed: (Attrs[i].Attrs.hasAttributes() && "Pointless attribute!"),
function get, file Attributes.cpp, line 367.
0  clang             0x000000010564ba82 _ZL15PrintStackTracePv + 34
1  clang             0x000000010564c069 _ZL13SignalHandleri + 745
2  libsystem_c.dylib 0x00007fff91c6bcfa _sigtramp + 26
3  libsystem_c.dylib 0xfa90516000000001 _sigtramp + 18054879643247919905
4  clang             0x000000010564bcd6 abort + 22
5  clang             0x000000010564bc98 __assert_rtn + 56
6  clang             0x000000010553c5c6
llvm::AttrListPtr::get(llvm::LLVMContext&,
llvm::ArrayRef<llvm::AttributeWithIndex>) + 566
7  clang             0x000000010404ffca
clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(clang::Decl const*,
clang::CodeGen::CGFunctionInfo const&, llvm::Function*) + 122
8  clang             0x00000001040506e9
clang::CodeGen::CodeGenModule::SetFunctionAttributes(clang::GlobalDecl,
llvm::Function*, bool) + 153
9  clang             0x0000000104052017
clang::CodeGen::CodeGenModule::GetOrCreateLLVMFunction(llvm::StringRef,
llvm::Type*, clang::GlobalDecl, bool, llvm::Attributes) + 343
10 clang             0x000000010405431b
clang::CodeGen::CodeGenModule::GetAddrOfFunction(clang::GlobalDecl,
llvm::Type*, bool) + 123
11 clang             0x0000000103fc33c0
clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(clang::CXXMemberCallExpr
const*, clang::CodeGen::ReturnValueSlot) + 2480
12 clang             0x0000000103fb5cc0
clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*,
clang::CodeGen::ReturnValueSlot) + 224
13 clang             0x0000000103fe93ab (anonymous
namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*) + 203
14 clang             0x0000000103fe2943 clang::StmtVisitorBase<clang::make_ptr,
(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) +
14787
15 clang             0x0000000103fd95cf
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 95
16 clang             0x0000000103fa79c5
clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(clang::Expr const*) + 293
17 clang             0x000000010404b504
clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(clang::Expr const*,
llvm::BasicBlock*, llvm::BasicBlock*) + 2020
18 clang             0x000000010404b34a
clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(clang::Expr const*,
llvm::BasicBlock*, llvm::BasicBlock*) + 1578
19 clang             0x0000000104038de8
clang::CodeGen::CodeGenFunction::EmitIfStmt(clang::IfStmt const&) + 360
20 clang             0x0000000104038683
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 451
21 clang             0x000000010403d6cc
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 236
22 clang             0x0000000104038aad
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 125
23 clang             0x00000001040384e9
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 41
24 clang             0x00000001040394f5
clang::CodeGen::CodeGenFunction::EmitWhileStmt(clang::WhileStmt const&) + 1301
25 clang             0x0000000104038693
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 467
26 clang             0x000000010403d6cc
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 236
27 clang             0x0000000104038aad
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 125
28 clang             0x00000001040384e9
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 41
29 clang             0x000000010404a53e
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 750
30 clang             0x00000001040538bb
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl)
+ 2107
31 clang             0x00000001040509d8
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 344
32 clang             0x00000001040529b1
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 689
33 clang             0x0000000104058248
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 296
34 clang             0x00000001040775cf (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 127
35 clang             0x000000010404736a
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 170
36 clang             0x0000000104085582 clang::ParseAST(clang::Sema&, bool,
bool) + 322
37 clang             0x00000001040466f2 clang::CodeGenAction::ExecuteAction() +
1314
38 clang             0x0000000103e1361b clang::FrontendAction::Execute() + 107
39 clang             0x0000000103df4ddf
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1007
40 clang             0x0000000103db6a9d
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3533
41 clang             0x0000000103dae291 cc1_main(char const**, char const**,
char const*, void*) + 849
42 clang             0x0000000103db27c3 main + 739
43 clang             0x0000000103dadf34 start + 52
Stack dump:
0.    Program arguments:
/Users/bhiggins/Work/llvm-3.2.src/Release+Asserts/bin/clang -cc1 -triple
x86_64-apple-macosx10.7.0 -emit-obj -mrelax-all -disable-free -main-file-name
main.cc -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 123.2.1 -resource-dir
/Users/bhiggins/Work/llvm-3.2.src/Release+Asserts/bin/../lib/clang/3.2
-fmodule-cache-path
/var/folders/49/0mf81n_j1zb3swgkn_95by4c0000gn/T/clang-module-cache
-fdeprecated-macro -fdebug-compilation-dir /Users/bhiggins/Work/cpp_primes
-ferror-limit 19 -fmessage-length 224 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime=macosx-10.7.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fencode-extended-block-signature
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/49/0mf81n_j1zb3swgkn_95by4c0000gn/T/main-JzTZ7K.o -x c++ ./main.cc 
1.    <eof> parser at end of file
2.    ./main.cc:33:5: LLVM IR generation of declaration 'main'
3.    ./main.cc:33:5: Generating code for declaration 'main'
4.    ./main.cc:34:1: LLVM IR generation of compound statement ('{}')
5.    ./main.cc:37:39: LLVM IR generation of compound statement ('{}')
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/49/0mf81n_j1zb3swgkn_95by4c0000gn/T/main-DTFNhz.cpp
clang: note: diagnostic msg:
/var/folders/49/0mf81n_j1zb3swgkn_95by4c0000gn/T/main-DTFNhz.sh
clang: note: diagnostic msg: 

********************

-- 
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/20130418/3fce339a/attachment.html>


More information about the llvm-bugs mailing list