[llvm-bugs] [Bug 50902] New: wrong code at -O2 on x86_64-linux-gnu
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jun 26 15:52:17 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50902
Bug ID: 50902
Summary: wrong code at -O2 on x86_64-linux-gnu
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: qrzhang at gatech.edu
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
It appears to be a regression in clang-11.
$ clang-trunk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
043ce4e6bdd376ff460d78446d1a6b94c6e0f18c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang-trunk abc.c ; ./a.out
0
$ clang-trunk -O2 abc.c ; ./a.out
Floating point exception
$ cat abc.c
int a, b, c, d;
char e[8];
char f;
int(g)(h, i) { return i && h < -1 / i; }
int main() {
int j = 1;
if (b)
c = j = 0;
if (g(j, &e[7] == &f))
d = 1;
printf("%X\n", a);
}
--
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/20210626/4c0c0144/attachment.html>
More information about the llvm-bugs
mailing list