[llvm-bugs] [Bug 48082] New: LLVM ERROR: Broken function found, compilation aborted! with "-simplifycfg -sroa -jump-threading -lcssa -loop-unroll"
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 5 01:04:05 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48082
Bug ID: 48082
Summary: LLVM ERROR: Broken function found, compilation
aborted! with "-simplifycfg -sroa -jump-threading
-lcssa -loop-unroll"
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: suochenyao at 163.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
*******************************************************************************
OS and Platform:
CentOS Linux release 7.8.2003 (Core), x86_64 GNU/Linux
*******************************************************************************
Program:
union a {
short b;
short c;
};
int d=1, e=1;
long f=1L, g=1L;
long (h)() {
return 0;
}
int i() {
union a j;
j.c=1;
for (;; j.c = h()) {
long k[4][3][4] = {g};
k[3][0][1] = g;
d = 0;
for (; d >= 0;)
return 0;
for (;;) {
if (j.c)
;
else {
int l=2;
int *m = &l;
int **n = &m;
for (; f;) {
for (; e;)
k[3][0][1];
&n == &n;
return 0;
}
}
if (j.b)
break;
}
}
return 0;
}
int main() {
return 0;
}
*******************************************************************************
clang version:
$ clang -v
clang version 12.0.0 (/home/suocy/src/llvm-dev/llvm-project/llvm/tools/clang
4455f3ce72ba2bb0276200f6f29629afca8812d4)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/suocy/bin/llvm-dev/bin
Found candidate GCC installation:
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Selected GCC installation:
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
*******************************************************************************
Command Lines:
$ clang -c -emit-llvm -O3 -mllvm -disable-llvm-optzns a.c -o a.bc
a.c:31:22: warning: expression result unused [-Wunused-value]
k[3][0][1];
~~~~~~~ ~^
a.c:32:14: warning: equality comparison result unused [-Wunused-comparison]
&n == &n;
~~~^~~~~
2 warnings generated.
$ opt -simplifycfg -sroa -jump-threading -lcssa -loop-unroll a.bc -o a.opt.bc
PHI nodes must have at least one entry. If the block is dead, the PHI should
be removed!
%retval.3 = phi i32
in function i
LLVM ERROR: Broken function found, compilation aborted!
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0. Program arguments: /home/suocy/bin/llvm-dev/bin/opt -simplifycfg -sroa
-jump-threading -lcssa -loop-unroll a.bc -o a.opt.bc
1. Running pass 'Function Pass Manager' on module 'a.bc'.
2. Running pass 'Module Verifier' on function '@i'
#0 0x0000000002a110fc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/home/suocy/bin/llvm-dev/bin/opt+0x2a110fc)
#1 0x0000000002a0f0a4 llvm::sys::RunSignalHandlers()
(/home/suocy/bin/llvm-dev/bin/opt+0x2a0f0a4)
#2 0x0000000002a0f203 SignalHandler(int)
(/home/suocy/bin/llvm-dev/bin/opt+0x2a0f203)
#3 0x00007f0ed8fb3630 __restore_rt (/lib64/libpthread.so.0+0xf630)
#4 0x00007f0ed7ba1387 raise (/lib64/libc.so.6+0x36387)
#5 0x00007f0ed7ba2a78 abort (/lib64/libc.so.6+0x37a78)
#6 0x0000000002984b24 llvm::report_fatal_error(llvm::Twine const&, bool)
(/home/suocy/bin/llvm-dev/bin/opt+0x2984b24)
#7 0x0000000002984c58 (/home/suocy/bin/llvm-dev/bin/opt+0x2984c58)
#8 0x00000000022de51f (anonymous
namespace)::VerifierLegacyPass::runOnFunction(llvm::Function&)
(/home/suocy/bin/llvm-dev/bin/opt+0x22de51f)
#9 0x0000000002263bd8 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/suocy/bin/llvm-dev/bin/opt+0x2263bd8)
#10 0x0000000002264679 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/suocy/bin/llvm-dev/bin/opt+0x2264679)
#11 0x0000000002263483 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/suocy/bin/llvm-dev/bin/opt+0x2263483)
#12 0x00000000007235ab main (/home/suocy/bin/llvm-dev/bin/opt+0x7235ab)
#13 0x00007f0ed7b8d555 __libc_start_main (/lib64/libc.so.6+0x22555)
#14 0x00000000007d7185 _start (/home/suocy/bin/llvm-dev/bin/opt+0x7d7185)
Aborted
--
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/20201105/aa3553bf/attachment.html>
More information about the llvm-bugs
mailing list