[llvm-bugs] [Bug 27668] New: Assertion fails when compiling certain ObjC code

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 6 12:26:57 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27668

            Bug ID: 27668
           Summary: Assertion fails when compiling certain ObjC code
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: js-llvm-bugzilla at webkeks.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Assertion failed: (getOperand(0)->getType() ==
cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a
pointer to Val type!"), function AssertOK, file ../lib/IR/Instructions.cpp,
line 1370.
0  libLLVMSupport.dylib       0x0000000103e7851b
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  libLLVMSupport.dylib       0x0000000103e77726 llvm::sys::RunSignalHandlers()
+ 70
2  libLLVMSupport.dylib       0x0000000103e78d71 SignalHandler(int) + 641
3  libsystem_platform.dylib   0x00007fff95fd452a _sigtramp + 26
4  libsystem_platform.dylib   0x00007fff664cb9a5 _sigtramp + 3494868117
5  libLLVMSupport.dylib       0x0000000103e78a46 abort + 22
6  libLLVMSupport.dylib       0x0000000103e78a21 __assert_rtn + 81
7  libLLVMCore.dylib          0x0000000103687763 llvm::StoreInst::AssertOK() +
211
8  libLLVMCore.dylib          0x0000000103687842
llvm::StoreInst::StoreInst(llvm::Value*, llvm::Value*, bool,
llvm::Instruction*) + 34
9  libclangCodeGen.dylib      0x00000001042a17e4
clang::CodeGen::CGBuilderTy::CreateStore(llvm::Value*, clang::CodeGen::Address,
bool) + 84
10 libclangCodeGen.dylib      0x000000010437a750
clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(llvm::Value*,
clang::CodeGen::Address, bool, clang::QualType,
clang::CodeGen::AlignmentSource, llvm::MDNode*, bool, clang::QualType, unsigned
long long, bool) + 944
11 libclangCodeGen.dylib      0x000000010436a3af
clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(clang::CodeGen::RValue,
clang::CodeGen::LValue, bool) + 1135
12 libclangCodeGen.dylib      0x00000001043b18d4
clang::StmtVisitorBase<clang::make_ptr, (anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 5140
13 libclangCodeGen.dylib      0x00000001043aa938
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 104
14 libclangCodeGen.dylib      0x0000000104368fa2
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 66
15 libclangCodeGen.dylib      0x0000000104368f4d
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 93
16 libclangCodeGen.dylib      0x0000000104450bb3
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 531
17 libclangCodeGen.dylib      0x0000000104459e1b
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) + 91
18 libclangCodeGen.dylib      0x00000001043c7605
clang::CodeGen::CodeGenFunction::GenerateObjCMethod(clang::ObjCMethodDecl
const*) + 229
19 libclangCodeGen.dylib      0x00000001044a7cb7
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 775
20 libclangCodeGen.dylib      0x00000001045250ef (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 143
21 libclangCodeGen.dylib      0x000000010448c3c5
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 165
22 libclangParse.dylib        0x00000001052ef162 clang::ParseAST(clang::Sema&,
bool, bool) + 482
23 libclangFrontend.dylib     0x00000001047ff1d9
clang::FrontendAction::Execute() + 73
24 libclangFrontend.dylib     0x00000001047c56c1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1105
25 libclangFrontendTool.dylib 0x00000001048af4c5
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4629
26 clang-3.9                  0x00000001012885cb cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1355
27 clang-3.9                  0x0000000101287033 main + 12003
28 libdyld.dylib              0x00007fff87d615ad start + 1
Stack dump:
0.    Program arguments: /usr/local/bin/clang-3.9 -cc1 -triple
x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage
-Werror=deprecated-objc-isa-usage -emit-obj -disable-free -main-file-name
OFXMLElement.m -mrelocation-model pic -pic-level 2 -mthread-model posix
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 264.3.101 -dwarf-column-info -debug-info-kind=standalone
-dwarf-version=2 -debugger-tuning=lldb -coverage-file
/Users/js/Devel/ObjFW/src/OFXMLElement.lib.o -resource-dir
/usr/local/bin/../lib/clang/3.9.0 -D PIC -I . -I .. -I exceptions -I runtime
-cxx-isystem /Library/Developer/CommandLineTools/usr/include/c++/v1 -O2 -Wall
-Wshorten-64-to-32 -Wsemicolon-before-method-body -Wobjc-property-synthesis
-Wwrite-strings -Wpointer-arith -Werror -Wcast-align -Wdocumentation -pedantic
-std=gnu11 -fconst-strings -fdebug-compilation-dir /Users/js/Devel/ObjFW/src
-fconstant-string-class OFConstantString -ferror-limit 19 -fmessage-length 80
-pthread -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.11.0
-fencode-extended-block-signature -fobjc-exceptions -fexceptions
-fno-constant-cfstrings -fmax-type-align=16 -fno-common
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o OFXMLElement.lib.o -x objective-c OFXMLElement.m 
1.    <eof> parser at end of file
2.    OFXMLElement.m:77:1: LLVM IR generation of declaration
'OFXMLElement::initialize'
clang-3.9: error: unable to execute command: Illegal instruction: 4
clang-3.9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.9.0 (git at github.com:llvm-mirror/clang.git
d385c5143e097c37379960e90f255a8c0c1f95ed) (git at github.com:llvm-mirror/llvm.git
bf20d51239d6e06a559bce1ec1424d4a078caf7d)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /usr/local/bin
clang-3.9: 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-3.9: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.9: note: diagnostic msg:
/var/folders/q0/3knxpgyn5db6gs1dx9h_r3xh0000gn/T/OFXMLElement-ba16ed.m
clang-3.9: note: diagnostic msg:
/var/folders/q0/3knxpgyn5db6gs1dx9h_r3xh0000gn/T/OFXMLElement-ba16ed.sh
clang-3.9: 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/20160506/6720707e/attachment.html>


More information about the llvm-bugs mailing list