[llvm-bugs] [Bug 52496] New: wrong code at -O1 on x86_64-linux-gnu
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Nov 13 08:58:24 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=52496
Bug ID: 52496
Summary: wrong code at -O1 on x86_64-linux-gnu
Product: new-bugs
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: zhendong.su at inf.ethz.ch
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
It appears to be a regression from 12.*.
[758] % clangtk -v
clang version 14.0.0 (https://github.com/llvm/llvm-project.git
8ed8d370880b5c4e7bbf52b50791710a9f4f834b)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
[759] %
[759] % clangtk -O0 -w small.c; ./a.out
[760] %
[760] % clangtk -O1 -w small.c
[761] % ./a.out
Aborted
[762] %
[762] % cat small.c
int printf(const char *, ...);
int a, *b;
int main() {
int *c, *d, e;
while (a) {
int f[1];
while (a)
printf(c);
c = f;
b = (int *)&d;
}
L:
e = 1;
if (a) {
printf("%d", a);
b = &e;
(*c)++;
}
if (a)
goto L;
if (!e)
__builtin_abort();
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/20211113/adfd3180/attachment.html>
More information about the llvm-bugs
mailing list