[llvm-bugs] [Bug 35253] New: clang crashes with "-mllvm -enable-newgvn": error in backend: Found 2 in/out CFI information errors.
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Nov 8 12:01:21 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35253
Bug ID: 35253
Summary: clang crashes with "-mllvm -enable-newgvn": error in
backend: Found 2 in/out CFI information errors.
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: helloqirun at gmail.com
CC: llvm-bugs at lists.llvm.org
It happens with newgvn enabled. Clang trunk works fine.
$ clang-trunk -v
clang version 6.0.0 (trunk 317674)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
$ clang-trunk -mllvm -enable-newgvn -O2 abc.c
abc.c:7:13: warning: | has lower precedence than ==; == will be evaluated first
[-Wparentheses]
b &= p1 | c == p1;
^~~~~~~~~
abc.c:7:13: note: place parentheses around the '==' expression to silence this
warning
b &= p1 | c == p1;
^
( )
abc.c:7:13: note: place parentheses around the | expression to evaluate it
first
b &= p1 | c == p1;
^
( )
abc.c:27:10: warning: expression result unused [-Wunused-value]
*h || 0;
~~ ^ ~
*** The incoming offset of a successor is inconsistent. ***
- function: fn2
- basic block: BB#5 for.body9.split (0x8d28088)
Successor BB#6 has incoming offset (8), while BB#5 has outgoing offset (16).
*** The outgoing offset of a predecessor is inconsistent. ***
- function: fn2
- basic block: BB#6 for.end13 (0x8d28148)
Predecessor BB#5 has outgoing offset (16), while BB#6 has incoming offset (8).
fatal error: error in backend: Found 2 in/out CFI information errors.
clang-6.0: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 6.0.0 (trunk 317674)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-6.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-6.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-6.0: note: diagnostic msg: /tmp/abc-c70957.c
clang-6.0: note: diagnostic msg: /tmp/abc-c70957.sh
clang-6.0: note: diagnostic msg:
********************
$ cat abc.c
long a;
short b;
int d;
void fn1(char p1) {
int c = a = 1;
for (; a <= 77; a++) {
b &= p1 | c == p1;
if (b)
p1 | (c = 0) ? a = 5335016568 : 0;
}
}
void fn2() {
char e;
for (; d;) {
long f;
fn1(a <= 0);
for (; a <= 9;)
if (0) {
int *g;
l1:
*g = 2;
}
for (; f <= 8;) {
char *h = &e;
goto l1;
l2:
*h || 0;
}
}
goto l2;
}
--
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/20171108/3aa074c8/attachment.html>
More information about the llvm-bugs
mailing list