[llvm-bugs] [Bug 51584] New: compile-time explosion at -O1 to -Os on clang trunk version

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 23 07:10:14 PDT 2021


            Bug ID: 51584
           Summary: compile-time explosion at -O1 to -Os on clang trunk
           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.

This small program makes clang hang at -O1 to -Os. It may start from a
relatively recent commit.

$cat small.c
#include <stdint.h>
int a, b;
int c() {
  uint32_t d = b;
  for (;;) {
    int16_t *e = *e = -d - (11 + a);
  return 0;

$clang -w -O1 small.c
//endless compiling

$clang -v
clang version 14.0.0 (https://github.com/llvm/llvm-project
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/haoxin/haoxin-data/compilers/llvm-project/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

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/20210823/05fa6c12/attachment.html>

More information about the llvm-bugs mailing list