Closed
Description
OS and Platform:
Ubuntu 20.04.4 LTS
clang version 17.0.4
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/ctc/llvm-releases/llvm-17.0.4/build/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@MX32
Selected multilib: .;@m64
Command Lines:
clang -O3 -mllvm -disable-llvm-optzns -c -emit-llvm a.c -o a.bc
opt -passes=correlated-propagation,dce,flattencfg a.bc -o a.opt.bc
clang a.opt.bc -o a.out
./a.out
Floating point exception (core dumped)
Source Code:
int a;
void b() {
int c;
unsigned int d = 6;
c = 3 % (((a || 0) < 0) - d || 0);
}
int main() { b(); }