| Issue |
233340
|
| Summary |
Wrong code at -O1 on x86
|
| Labels |
miscompilation,
llvm:optimizations,
generated by fuzzer
|
| Assignees |
|
| Reporter |
XChy
|
Reproducer: https://godbolt.org/z/hh5YvnEGE
Reduced case:
```c
#include <stdint.h>
uint64_t g19, g18, g9, g8;
uint32_t g20;
uint8_t g29;
_Bool launch_c7;
void launch()
{
uint32_t bb4;
uint8_t v6;
_Bool c14 = 0;
lbl_f0_b3:
v6 = g9 = c14 ?: g20;
c14 = launch_c7;
switch (v6)
{
case 1:
case 20: goto lbl_f0_b4;
default: goto lbl_f0_b8;
}
lbl_f0_b4:
lbl_f0_b6:
g19 = *(uint8_t *)(g9 < bb4);
bb4 = g18;
switch (g29)
{
case 126:
case 146: goto lbl_f0_b3;
case 70:
case 136: goto lbl_f0_b6;
default: goto lbl_f0_b11;
}
lbl_f0_b8:
return;
lbl_f0_b11:
*(uint16_t *)0 = g8;
}
int main() { launch(); }
```
This case triggers SIGSEGV at -O1, and terminates normally at -O0.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs