| Issue |
71311
|
| Summary |
clang hangs when compile at -O2/3 on x86_64
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
jun-wei-zeng
|
Compiler explorer: https://godbolt.org/z/z9PxYdbs6
When compiled the following program using clang under `-O2/3`, it hangs.
I found this bug exists on `clang-16.0.0`, `clang-17.0.1` and the latest `trunk`.
```c
static unsigned short a() {
char b = 8;
volatile unsigned int c;
int d = 2147483648;
int e;
int f;
for (f = 0; f <= 7; f++)
for (e = 0; e < 2; e++)
do {
d += 5;
c = b;
} while (d < 0);
}
void main() { a(); }
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs