[LLVMbugs] [Bug 19279] New: clang assert in SROA with -ffake-address-space-map option

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 28 14:11:25 PDT 2014


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

            Bug ID: 19279
           Summary: clang assert in SROA with -ffake-address-space-map
                    option
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kraiskil at ovi.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12308
  --> http://llvm.org/bugs/attachment.cgi?id=12308&action=edit
input source code

The attachecd input makes clang (trunk, rev205012) assert. The error does not
occur with clang/llvm 3.4, or if -ffake-address-space-map option is not given.

$ clang -cc1 -emit-llvm-bc -ffake-address-space-map -x cl minimized.cl
clang: /home/kraiskil/llvm/llvm/lib/IR/Instructions.cpp:2381: static
llvm::CastInst* llvm::CastInst::Create(llvm::Instruction::CastOps,
llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion
`castIsValid(op, S, Ty) && "Invalid cast!"' failed.
0  libLLVM-3.5.0svn.so 0x00007f9250f7841a llvm::sys::PrintStackTrace(_IO_FILE*)
+ 38
1  libLLVM-3.5.0svn.so 0x00007f9250f786a1
2  libLLVM-3.5.0svn.so 0x00007f9250f78034
3  libpthread.so.0     0x00007f924f53f030
4  libc.so.6           0x00007f924e1c2475 gsignal + 53
5  libc.so.6           0x00007f924e1c56f0 abort + 384
6  libc.so.6           0x00007f924e1bb621 __assert_fail + 241
7  libLLVM-3.5.0svn.so 0x00007f9250875f5b
llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*, llvm::Type*,
llvm::Twine const&, llvm::Instruction*) + 87
8  libLLVM-3.5.0svn.so 0x00007f9250cfe4f7
9  libLLVM-3.5.0svn.so 0x00007f9250cfaff2
10 libLLVM-3.5.0svn.so 0x00007f9250cef1cf
11 libLLVM-3.5.0svn.so 0x00007f9250cf23c5
12 libLLVM-3.5.0svn.so 0x00007f9250d01f2f
13 libLLVM-3.5.0svn.so 0x00007f9250cfec21
14 libLLVM-3.5.0svn.so 0x00007f9250cfb725
15 libLLVM-3.5.0svn.so 0x00007f9250cf1665
16 libLLVM-3.5.0svn.so 0x00007f9250cf73ef
17 libLLVM-3.5.0svn.so 0x00007f9250cf7e20
18 libLLVM-3.5.0svn.so 0x00007f9250cf8637
19 libLLVM-3.5.0svn.so 0x00007f9250cf931b
20 libLLVM-3.5.0svn.so 0x00007f9250891df1
llvm::FPPassManager::runOnFunction(llvm::Function&) + 385
21 libLLVM-3.5.0svn.so 0x00007f9250891b38
llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) + 84
22 libLLVM-3.5.0svn.so 0x00007f9250891710
llvm::legacy::FunctionPassManager::run(llvm::Function&) + 180
23 clang               0x0000000000c2506f
24 clang               0x0000000000c25225
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 133
25 clang               0x0000000000c1e2a9
26 clang               0x0000000000e4889f clang::ParseAST(clang::Sema&, bool,
bool) + 788
27 clang               0x000000000098b781
clang::ASTFrontendAction::ExecuteAction() + 321
28 clang               0x0000000000c1fe63 clang::CodeGenAction::ExecuteAction()
+ 1435
29 clang               0x000000000098b2b0 clang::FrontendAction::Execute() +
200
30 clang               0x000000000095a98e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 720
31 clang               0x0000000000922815
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1063
32 clang               0x0000000000911972 cc1_main(char const**, char const**,
char const*, void*) + 636
33 clang               0x000000000091dff8 main + 798
34 libc.so.6           0x00007f924e1aeead __libc_start_main + 253
35 clang               0x0000000000910199
Stack dump:
0.    Program arguments: /opt/llvm/svn/bin/clang -cc1 -emit-llvm-bc
-ffake-address-space-map -x cl minimized.cl 
1.    <eof> parser at end of file
2.    Per-function optimization
3.    Running pass 'SROA' on function '@get_image_depth'
Avbruten (SIGABRT)

-- 
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/20140328/0c83c1c4/attachment.html>


More information about the llvm-bugs mailing list