- Notifications
You must be signed in to change notification settings - Fork 15.1k
Description
| Bugzilla Link | 49475 |
| Resolution | FIXED |
| Resolved on | Mar 30, 2021 20:14 |
| Version | trunk |
| OS | All |
| Blocks | #48246 |
| CC | @aeubanks,@dwblaikie,@echristo,@fhahn,@rotateright,@tstellar |
| Fixed by commit(s) | 579b8fc 4224a36 5b34806 ff2cf8f |
Extended Description
Hi, all.
This program, small.c, makes Clang-trunk hung on with -O1 at compile time.
$cat small.c
#include <stdint.h>
int a;
void b() {
int c;
uint16_t d;
uint64_t e;
if (d = a) {
uint8_t *f;
for (;;) {
for (; *f;)
f = &d;
uint8_t g = &e;
}
}
for (;;) {
int8_t i;
int32_t j;
int64_t k;
if (a) {
int64_t *l = &e;
j = e - (*l = 0);
for (; i; i++) {
int32_t *m = &j;
k ^= a & (5 ? j || d : 0);
if (d |= (k |= e &= a) >= i - *m)
for (c = 3; c; c)
;
}
}
}
}
$clang -w -c -O1 small.c
//endless compiling
#clang -v
clang version 13.0.0 (https://github.com/llvm/llvm-project a968e7b)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/haoxin/haoxin-data/dut-research/compilers/llvm-project/build-20210304/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Candidate multilib: .;@m64
Selected multilib: .;@m64
Thanks,
Haoxin