| Issue |
165382
|
| Summary |
[Clang] Miscompilation at -O{1,2,3} on x86_64-linux-gnu
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
iamanonymouscs
|
This program returns 0 at -O0/s and 139 at -O1/2/3
```
int a, b;
short c, e;
long d[56];
int main() {
a = 0;
for (; a < 6; a++) {
b = 0;
for (; b < 8; b++) {
if ((e ^ c) & 32768)
e = e << 1 ^ 3;
else
e <<= 1;
c <<= 1;
}
d[b + c - a] = 0;
}
}
```
Compiler Explorer: https://godbolt.org/z/fxjj1o4Yf
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs