public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/109917] New: gcctk hangs at -O0 but normally terminates at -O2
@ 2023-05-20 12:32 141242068 at smail dot nju.edu.cn
  2023-05-20 14:36 ` [Bug middle-end/109917] " pinskia at gcc dot gnu.org
  2023-05-20 14:49 ` 141242068 at smail dot nju.edu.cn
  0 siblings, 2 replies; 3+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-05-20 12:32 UTC (permalink / raw)
  To: gcc-bugs

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.
```

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/109917] gcctk hangs at -O0 but normally terminates at -O2
  2023-05-20 12:32 [Bug c/109917] New: gcctk hangs at -O0 but normally terminates at -O2 141242068 at smail dot nju.edu.cn
@ 2023-05-20 14:36 ` pinskia at gcc dot gnu.org
  2023-05-20 14:49 ` 141242068 at smail dot nju.edu.cn
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-20 14:36 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug  109520.

Where is this code located anyways?

*** This bug has been marked as a duplicate of bug 109520 ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/109917] gcctk hangs at -O0 but normally terminates at -O2
  2023-05-20 12:32 [Bug c/109917] New: gcctk hangs at -O0 but normally terminates at -O2 141242068 at smail dot nju.edu.cn
  2023-05-20 14:36 ` [Bug middle-end/109917] " pinskia at gcc dot gnu.org
@ 2023-05-20 14:49 ` 141242068 at smail dot nju.edu.cn
  1 sibling, 0 replies; 3+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-05-20 14:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from wierton <141242068 at smail dot nju.edu.cn> ---
(In reply to Andrew Pinski from comment #1)
> Dup of bug  109520.
> 
> Where is this code located anyways?
> 
> *** This bug has been marked as a duplicate of bug 109520 ***

Thanks for your reply. This test case is mutated from the file 'asmgoto-5.c'
which locates at gcc's testsuite: 'gcc/gcc/testsuite/gcc.c-torture/compile'.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-20 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-20 12:32 [Bug c/109917] New: gcctk hangs at -O0 but normally terminates at -O2 141242068 at smail dot nju.edu.cn
2023-05-20 14:36 ` [Bug middle-end/109917] " pinskia at gcc dot gnu.org
2023-05-20 14:49 ` 141242068 at smail dot nju.edu.cn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).