| Issue |
71700
|
| Summary |
wrong code at -O1 and above on x86_64-linux-gnu
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
zhendongsu
|
This appears to be a recent regression as it does not reproduce with 17.0.1.
Compiler Explorer: https://godbolt.org/z/bj9rra8vv
```
[619] % clangtk -v
clang version 18.0.0 (https://github.com/llvm/llvm-project.git 6eb97f03802a219997af4b615a2afae339cb674d)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Candidate multilib: .;@m64
Selected multilib: .;@m64
[620] %
[620] % clangtk -O1 small.c
[621] % ./a.out
Aborted
[622] % cat small.c
int a, c;
char b = -50;
long d = 10;
int main() {
int e = -1, f = ~(a / -1U);
if (b)
e = f;
a = ~(-((e - b) % d) | ~e);
if (a <= c)
__builtin_abort();
return 0;
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs