[llvm-bugs] [Bug 33413] New: opt crashes with "opt -early-cse-memssa": Assertion `Val && "isa<> used on a null pointer"' failed
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jun 11 19:31:46 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33413
Bug ID: 33413
Summary: opt crashes with "opt -early-cse-memssa": Assertion
`Val && "isa<> used on a null pointer"' failed
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: su at cs.ucdavis.edu
CC: llvm-bugs at lists.llvm.org
$ clang -v
clang version 5.0.0 (trunk 305165) (llvm/trunk 305163)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.4
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.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.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
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clang -O3 -mllvm -disable-llvm-optzns -c -emit-llvm -o small.bc small.c
$ opt -early-cse-memssa -o small-opt.bc small.bc
opt: /tmp/llvm-builder/llvm-source-trunk/include/llvm/Support/Casting.h:92:
static bool llvm::isa_impl_cl<To, From*>::doit(const From*) [with To =
llvm::MemoryAccess; From = llvm::Value]: Assertion `Val && "isa<> used on a
null pointer"' failed.
#0 0x0000000001e7ef0a (opt+0x1e7ef0a)
#1 0x0000000001e7cc7e (opt+0x1e7cc7e)
#2 0x0000000001e7cdf2 (opt+0x1e7cdf2)
#3 0x00007f6b79cc6390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007f6b78a39428 gsignal
/build/glibc-9tT8Do/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f6b78a3b02a abort /build/glibc-9tT8Do/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007f6b78a31bd7 __assert_fail_base
/build/glibc-9tT8Do/glibc-2.23/assert/assert.c:92:0
#7 0x00007f6b78a31c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x000000000236ce28 (opt+0x236ce28)
#9 0x0000000001c4505c (opt+0x1c4505c)
#10 0x0000000001c498fe (opt+0x1c498fe)
#11 0x0000000001c4a1c4 (opt+0x1c4a1c4)
#12 0x0000000001c4b25e (opt+0x1c4b25e)
#13 0x000000000197cf83 (opt+0x197cf83)
#14 0x000000000197d04c (opt+0x197d04c)
#15 0x000000000197caed (opt+0x197caed)
#16 0x00000000007aeeec (opt+0x7aeeec)
#17 0x00007f6b78a24830 __libc_start_main
/build/glibc-9tT8Do/glibc-2.23/csu/../csu/libc-start.c:325:0
#18 0x0000000000819459 (opt+0x819459)
Stack dump:
0. Program arguments: opt -early-cse-memssa -o small-opt.bc small.bc
1. Running pass 'Function Pass Manager' on module 'small.bc'.
2. Running pass 'Early CSE w/ MemorySSA' on function '@f'
Aborted (core dumped)
$
-------------------------------
int a, b, c;
void f ()
{
for (; a; a++)
{
if (c)
continue;
b |= 0;
if (a)
continue;
}
}
int main ()
{
f ();
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/20170612/52516438/attachment.html>
More information about the llvm-bugs
mailing list