[llvm-bugs] [Bug 32174] New: crash at -Os and above on x86_64-linux-gnu (Assertion `(isa<SCEVCouldNotCompute>(ExactNotTaken) || !isa<SCEVCouldNotCompute>(MaxNotTaken)) && "Exact is not allowed to be less precise than Max"' failed.)
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 7 14:19:39 PST 2017
http://bugs.llvm.org/show_bug.cgi?id=32174
Bug ID: 32174
Summary: crash at -Os and above on x86_64-linux-gnu (Assertion
`(isa<SCEVCouldNotCompute>(ExactNotTaken) ||
!isa<SCEVCouldNotCompute>(MaxNotTaken)) && "Exact is
not allowed to be less precise than Max"' failed.)
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: chengniansun at gmail.com
CC: llvm-bugs at lists.llvm.org
$ clang-trunk -v
clang version 5.0.0 (trunk 297150)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clang-trunk -O3 small.c
clang-5.0:
/tmp/llvm-builder/llvm-source-trunk/include/llvm/Analysis/ScalarEvolution.h:580:
llvm::ScalarEvolution::ExitLimit::ExitLimit(const llvm::SCEV*, const
llvm::SCEV*, bool, llvm::ArrayRef<const llvm::SmallPtrSetImpl<const
llvm::SCEVPredicate*>*>): Assertion `(isa<SCEVCouldNotCompute>(ExactNotTaken)
|| !isa<SCEVCouldNotCompute>(MaxNotTaken)) && "Exact is not allowed to be less
precise than Max"' failed.
#0 0x0000000001efaf6a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1efaf6a)
#1 0x0000000001ef8f8e llvm::sys::RunSignalHandlers()
(/usr/local/clang-trunk/bin/clang-5.0+0x1ef8f8e)
#2 0x0000000001ef90f2 SignalHandler(int)
(/usr/local/clang-trunk/bin/clang-5.0+0x1ef90f2)
#3 0x00007f79cc844330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f79cb635c37 gsignal
/build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f79cb639028 abort
/build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f79cb62ebf6 __assert_fail_base
/build/eglibc-oGUzwX/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f79cb62eca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x00000000016c5b7d llvm::ScalarEvolution::ExitLimit::ExitLimit(llvm::SCEV
const*, llvm::SCEV const*, bool,
llvm::ArrayRef<llvm::SmallPtrSetImpl<llvm::SCEVPredicate const*> const*>)
(/usr/local/clang-trunk/bin/clang-5.0+0x16c5b7d)
#9 0x00000000016d92c4
llvm::ScalarEvolution::computeExitLimitFromCond(llvm::Loop const*,
llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, bool, bool)
(/usr/local/clang-trunk/bin/clang-5.0+0x16d92c4)
#10 0x00000000016d96c6 llvm::ScalarEvolution::computeExitLimit(llvm::Loop
const*, llvm::BasicBlock*, bool)
(/usr/local/clang-trunk/bin/clang-5.0+0x16d96c6)
#11 0x00000000016d99aa
llvm::ScalarEvolution::computeBackedgeTakenCount(llvm::Loop const*, bool)
(/usr/local/clang-trunk/bin/clang-5.0+0x16d99aa)
#12 0x00000000016d9d3a llvm::ScalarEvolution::getBackedgeTakenInfo(llvm::Loop
const*) (/usr/local/clang-trunk/bin/clang-5.0+0x16d9d3a)
#13 0x00000000016dae49
llvm::ScalarEvolution::getMaxBackedgeTakenCount(llvm::Loop const*)
(/usr/local/clang-trunk/bin/clang-5.0+0x16dae49)
#14 0x00000000016dae69
llvm::ScalarEvolution::getSmallConstantMaxTripCount(llvm::Loop*)
(/usr/local/clang-trunk/bin/clang-5.0+0x16dae69)
#15 0x0000000002020988 llvm::LoopVectorizePass::processLoop(llvm::Loop*)
(/usr/local/clang-trunk/bin/clang-5.0+0x2020988)
#16 0x000000000202366f llvm::LoopVectorizePass::runImpl(llvm::Function&,
llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&,
llvm::DominatorTree&, llvm::BlockFrequencyInfo&, llvm::TargetLibraryInfo*,
llvm::DemandedBits&, llvm::AAResults&, llvm::AssumptionCache&,
std::function<llvm::LoopAccessInfo const& (llvm::Loop&)>&,
llvm::OptimizationRemarkEmitter&)
(/usr/local/clang-trunk/bin/clang-5.0+0x202366f)
#17 0x0000000002023d24 (anonymous
namespace)::LoopVectorize::runOnFunction(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-5.0+0x2023d24)
#18 0x0000000001ae4713 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1ae4713)
#19 0x0000000001ae47bc llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1ae47bc)
#20 0x0000000001ae4fff llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-5.0+0x1ae4fff)
#21 0x000000000208595a (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/local/clang-trunk/bin/clang-5.0+0x208595a)
#22 0x0000000002086c43 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, 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> >)
(/usr/local/clang-trunk/bin/clang-5.0+0x2086c43)
#23 0x00000000026ef88c
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/clang-trunk/bin/clang-5.0+0x26ef88c)
#24 0x0000000002ab5322 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/clang-trunk/bin/clang-5.0+0x2ab5322)
#25 0x00000000026ee22a clang::CodeGenAction::ExecuteAction()
(/usr/local/clang-trunk/bin/clang-5.0+0x26ee22a)
#26 0x00000000023ce4f6 clang::FrontendAction::Execute()
(/usr/local/clang-trunk/bin/clang-5.0+0x23ce4f6)
#27 0x00000000023a8ba6
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/clang-trunk/bin/clang-5.0+0x23a8ba6)
#28 0x0000000002459ee4
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/clang-trunk/bin/clang-5.0+0x2459ee4)
#29 0x0000000000b233d8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/clang-trunk/bin/clang-5.0+0xb233d8)
#30 0x0000000000ac4aca main (/usr/local/clang-trunk/bin/clang-5.0+0xac4aca)
#31 0x00007f79cb620f45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#32 0x0000000000b1ecc9 _start (/usr/local/clang-trunk/bin/clang-5.0+0xb1ecc9)
Stack dump:
0. Program arguments: /usr/local/clang-trunk/bin/clang-5.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -resource-dir
/usr/local/clang-trunk/lib/clang/5.0.0 -c-isystem . -c-isystem
/usr/local/include/csmith-2.2.0/ -internal-isystem /usr/local/include
-internal-isystem /usr/local/clang-trunk/lib/clang/5.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-fdebug-compilation-dir
/home/cnsun/ramdisk/hermes/run-2/res/20170307-clang-trunk-m32-Weverything-g-O3-build-074016/delta
-ferror-limit 19 -fmessage-length 204 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o /tmp/small-d874d9.o -x c small.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'small.c'.
4. Running pass 'Loop Vectorization' on function '@main'
clang-5.0: error: unable to execute command: Aborted (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 5.0.0 (trunk 297150)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-5.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-5.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-5.0: note: diagnostic msg: /tmp/small-4f75a4.c
clang-5.0: note: diagnostic msg: /tmp/small-4f75a4.sh
clang-5.0: note: diagnostic msg:
********************
$
$ cat small.c
unsigned a;
int main() {
while (28 > a)
;
while ((a && a < 28) || a < 28L)
a++;
return 0;
}
$
$
$
--
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/20170307/6cdcfa54/attachment.html>
More information about the llvm-bugs
mailing list