| Issue |
203868
|
| Summary |
Wrong code at -O2/3/s on x86_64-linux-gnu since clang-20
|
| Labels |
miscompilation,
generated by fuzzer
|
| Assignees |
|
| Reporter |
XChy
|
Reproducer: https://godbolt.org/z/KrsxP8MrT
Testcase:
```c
#include <stdint.h>
#include <stdio.h>
int64_t __chk, g28, g19;
_Bool launch_c0;
int main()
{
int64_t arr1[9];
_Bool c3, c6;
int64_t ov11;
lbl_br1:
ov11 = g28;
c3 = c6 = 0;
if (c6) goto lbl_br1;
c6 = (int32_t)&c3;
g19 = 0;
if (c3) goto lbl_bf7;
lbl_br6:
if (c6)
{
c6 = 8;
lbl_bf7:
arr1[4] = ov11;
if (c6)
{
c6 = 0;
ov11 = arr1[0];
}
launch_c0;
goto lbl_br6;
}
__chk = arr1[4];
printf("checksum=0x%016llx\n", (unsigned long long)__chk);
return 0;
}
```
This testcase outputs `checksum=0x0000000000000000` at -O0, and outputs `checksum=0x00007ffd707deb38` at -O2/3/s instead.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs