[llvm-bugs] [Bug 50254] New: compile-time explosion at -O2 and -O3 on clang trunck version

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 7 00:58:36 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50254

            Bug ID: 50254
           Summary: compile-time explosion at -O2 and -O3 on clang trunck
                    version
           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;
uint64_t c;
void d() {
  static e;
  int16_t *f = &e;
  int8_t *g = &b;
  int32_t *i = &a;
  for (*g = 9; *g; *g += 1) {
    int8_t j = 174;
    c += 0xE3CDB098 ^ ((*f ^= *i) ^ (127 | j));
  }
}

$clang -w -O2 small.c
//endless compling

$clang -w -O3 small.c
//endless compling

$clang -v
clang version 13.0.0 (https://github.com/llvm/llvm-project
e5984a3680bef22d422beaafa73bf131d7197973)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/haoxin/haoxin-data/dut-research/compilers/llvm-project/build-20210502/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
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
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

Reproduced in Godbolt: https://godbolt.org/z/czvKeK454


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/20210507/dd7c491e/attachment.html>


More information about the llvm-bugs mailing list