[llvm-bugs] [Bug 49785] New: Infinite loop at -O3
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 31 07:15:56 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=49785
Bug ID: 49785
Summary: Infinite loop at -O3
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: haoxintu at gmail.com
CC: llvm-bugs at lists.llvm.org
Hi all.
$cat small.c
#include <stdint.h>
int a, b, c, d;
uint16_t e;
void f() {
uint16_t *g = &e;
int8_t *i = &a;
for (c = 5; c <= 63; c++)
for (*g = 9; *g <= 60; *g += 1)
if ((e ^ b) != d) {
int8_t *j = a;
for (*j = 3; *j <= 32; *j += 1)
if (*j)
for (*i = 1; *i <= 30;)
*i &= 0 == c;
}
}
$clang -w -O3 small.c
//endless compiling
$clang -v
clang version 13.0.0 (https://github.com/llvm/llvm-project
850fcedb272ff07ac46b9880e628caec2de3eb2c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/haoxin/haoxin-data/dut-research/compilers/llvm-project/build-20210330/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/7.5.0
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
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210331/93a0e2c1/attachment.html>
More information about the llvm-bugs
mailing list