[llvm-bugs] [Bug 30777] New: Assertion `DestBits == SrcBits && "Illegal cast to vector (wrong type or size)"' failed
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 24 13:35:58 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30777
Bug ID: 30777
Summary: Assertion `DestBits == SrcBits && "Illegal cast to
vector (wrong type or size)"' failed
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: Vsevolod.Livinskij at frtk.ru
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 17481
--> https://llvm.org/bugs/attachment.cgi?id=17481&action=edit
Reproducer.
Assertion `DestBits == SrcBits && "Illegal cast to vector (wrong type or
size)"' failed.
===============================================================================
Reproducer:
int a;
int b[8];
void c() {
for (int d = 0; d < 4; d = d + 1)
for (int e = 0; e < a; e = e + 1)
for (int f = 0; f < 6; f = f + 1)
b[e * 9 + f] = 60118938621769210;
}
===============================================================================
LLVM version:
clang version 4.0.0 (trunk 284990)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/vlivinsk/workspace/llvm/bin-trunk//bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
===============================================================================
Error:
>$ clang++ -std=c++11 -O3 -march=knl -o small.o -c small.cpp
clang-4.0:
/home/vlivinsk/workspace/llvm/llvm-trunk/lib/IR/Instructions.cpp:3001: static
llvm::Instruction::CastOps llvm::CastInst::getCastOpcode(const llvm::Value*,
bool, llvm::Type*, bool): Assertion `DestBits == SrcBits && "Illegal cast to
vector (wrong type or size)"' failed.
#0 0x00000000014298b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x14298b8)
#1 0x000000000142750e llvm::sys::RunSignalHandlers()
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x142750e)
#2 0x0000000001427682 SignalHandler(int)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1427682)
#3 0x00007fde11aa03d0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x113d0)
#4 0x00007fde10c56418 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35418)
#5 0x00007fde10c5801a abort (/lib/x86_64-linux-gnu/libc.so.6+0x3701a)
#6 0x00007fde10c4ebd7 (/lib/x86_64-linux-gnu/libc.so.6+0x2dbd7)
#7 0x00007fde10c4ec82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x000000000101e048 llvm::CastInst::getCastOpcode(llvm::Value const*, bool,
llvm::Type*, bool)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x101e048)
#9 0x0000000000b7f70a (anonymous
namespace)::SymbolicallyEvaluateGEP(llvm::GEPOperator const*,
llvm::ArrayRef<llvm::Constant*>, llvm::DataLayout const&,
llvm::TargetLibraryInfo const*) [clone .constprop.283]
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0xb7f70a)
#10 0x0000000000b807e1 (anonymous
namespace)::ConstantFoldInstOperandsImpl(llvm::Value const*, unsigned int,
llvm::ArrayRef<llvm::Constant*>, llvm::DataLayout const&,
llvm::TargetLibraryInfo const*)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0xb807e1)
#11 0x0000000000b812bf llvm::ConstantFoldInstruction(llvm::Instruction*,
llvm::DataLayout const&, llvm::TargetLibraryInfo const*)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0xb812bf)
#12 0x0000000001107ae4 AddReachableCodeToWorklist(llvm::BasicBlock*,
llvm::DataLayout const&, llvm::SmallPtrSetImpl<llvm::BasicBlock*>&,
llvm::InstCombineWorklist&, llvm::TargetLibraryInfo const*) [clone
.constprop.752]
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1107ae4)
#13 0x0000000001108726 combineInstructionsOverFunction(llvm::Function&,
llvm::InstCombineWorklist&, llvm::AAResults*, llvm::AssumptionCache&,
llvm::TargetLibraryInfo&, llvm::DominatorTree&, bool, llvm::LoopInfo*) [clone
.constprop.750]
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1108726)
#14 0x0000000001108c70
llvm::InstructionCombiningPass::runOnFunction(llvm::Function&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1108c70)
#15 0x000000000103f803 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x103f803)
#16 0x000000000103f8cc llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x103f8cc)
#17 0x000000000103f36d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x103f36d)
#18 0x00000000015b34a4 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x15b34a4)
#19 0x0000000001be2623
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1be2623)
#20 0x0000000001fc4f38 clang::ParseAST(clang::Sema&, bool, bool)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1fc4f38)
#21 0x0000000001bdda69 clang::CodeGenAction::ExecuteAction()
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1bdda69)
#22 0x00000000018eee16 clang::FrontendAction::Execute()
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x18eee16)
#23 0x00000000018c1146
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x18c1146)
#24 0x00000000019748a2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x19748a2)
#25 0x000000000091d048 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x91d048)
#26 0x00000000008dfa54 main
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x8dfa54)
#27 0x00007fde10c41830 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x20830)
#28 0x0000000000919a19 _start
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x919a19)
Stack dump:
0. Program arguments:
/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name small.cpp
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu knl
-momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb
-coverage-notes-file
/home/vlivinsk/workspace/yarpgen/found/loop/clang/S_1641522603/small.gcno
-resource-dir /home/vlivinsk/workspace/llvm/bin-trunk/bin/../lib/clang/4.0.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/backward
-internal-isystem /usr/local/include -internal-isystem
/home/vlivinsk/workspace/llvm/bin-trunk/bin/../lib/clang/4.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/home/vlivinsk/workspace/yarpgen/found/loop/clang/S_1641522603 -ferror-limit 19
-fmessage-length 172 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o small.o -x c++
small.cpp
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'small.cpp'.
4. Running pass 'Combine redundant instructions' on function '@_Z1cv'
clang-4.0: error: unable to execute command: Aborted (core dumped)
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 284990)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/vlivinsk/workspace/llvm/bin-trunk//bin
clang-4.0: 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-4.0: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-4.0: note: diagnostic msg: /tmp/small-b96e99.cpp
clang-4.0: note: diagnostic msg: /tmp/small-b96e99.sh
clang-4.0: 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/20161024/ce193591/attachment.html>
More information about the llvm-bugs
mailing list