https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109917

            Bug ID: 109917
           Summary: gcctk hangs at -O0 but normally terminates at -O2
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 141242068 at smail dot nju.edu.cn
  Target Milestone: ---

Below is the testcase:
```
int foo(int a0, int a1, int a2, int a3, int a4, int a5,
    int a6, int a7, int a8, int a9, int a10, int a11,
    int a12, int a13, int a14, int a15, int a16) {
  register int v0 asm("rax") = a3;
  register int v5 asm("rdi") = a8;
  register int v1 asm("rbx") = a4;
  register int v2 asm("rcx") = a5;
  register int v3 asm("rdx") = a6;
  register int v4 asm("rsi") = a7;

  register int v6 asm("r8") = a9;
  register int v7 asm("r9") = a10;
  register int v8 asm("r10") = a11;
  register int v9 asm("r11") = a12;
  register int v10 asm("r12") = a13;
  register int v11 asm("r13") = a14;
  register int v12 asm("r14") = a15;
  register int v13 asm("r15") = a16;
  int x;

  asm goto("" : "=r"(x) : : : lab);
lab:
  return v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 +
         v10 + v11 + v12 + v13 + a0 + a1 + a2;
}

```

When compile it with gcctk -O0, gcctk hangs, my gcctk version:
```
$ gcctk -v
Using built-in specs.
COLLECT_GCC=./install/bin/gcc
COLLECT_LTO_WRAPPER=/home/wierton/disk/gcc-project-trunk-compile/install/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/wierton/gcc-project-trunk/configure
--prefix=/home/wierton/disk/gcc-project-trunk-compile/install
--enable-languages=c,c++ --disable-bootstrap --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20230520 (experimental) (GCC)

$ gcctk --version
gcc (GCC) 14.0.0 20230520 (experimental)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

Reply via email to