public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/109842] New: GCC-12 hangs on simple piece of inline assembly code
@ 2023-05-13  9:12 141242068 at smail dot nju.edu.cn
  2023-05-13  9:20 ` [Bug middle-end/109842] " xry111 at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-05-13  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109842
           Summary: GCC-12 hangs on simple piece of inline assembly code
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 141242068 at smail dot nju.edu.cn
  Target Milestone: ---

The bug-triggering testcase:

```
$ cat c.c
static int t;

int f_tt;
int f(void) {
  int tt1;
  asm("" : "=r"(f_tt), "=r"(tt1));
  t = tt1;
  return f_tt;
}

```

When compiled with `gcc-12 -O2`, gcc hangs
```
-> tmp $ gcc-12 -O2 c.c
^C
```

My gcc version:
```
-> tmp $ gcc-12 -v
Using built-in specs.
COLLECT_GCC=gcc-12
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
12.1.0-2ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-12
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--enable-default-pie --with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
--disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/gcc-12-sZcx2y/gcc-12-12.1.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-sZcx2y/gcc-12-12.1.0/debian/tmp-gcn/usr
--enable-offload-defaulted --without-cuda-driver --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (Ubuntu 12.1.0-2ubuntu1~22.04)

```

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

* [Bug middle-end/109842] GCC-12 hangs on simple piece of inline assembly code
  2023-05-13  9:12 [Bug middle-end/109842] New: GCC-12 hangs on simple piece of inline assembly code 141242068 at smail dot nju.edu.cn
@ 2023-05-13  9:20 ` xry111 at gcc dot gnu.org
  2023-05-13 10:20 ` [Bug tree-optimization/109842] " xry111 at gcc dot gnu.org
  2023-05-13 14:17 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: xry111 at gcc dot gnu.org @ 2023-05-13  9:20 UTC (permalink / raw)
  To: gcc-bugs

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

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |12.1.0, 12.2.0
      Known to work|                            |11.1.0, 12.3.0, 13.1.0
                 CC|                            |xry111 at gcc dot gnu.org

--- Comment #1 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Looks like a duplicate of some bug fixed in 12.3.

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

* [Bug tree-optimization/109842] GCC-12 hangs on simple piece of inline assembly code
  2023-05-13  9:12 [Bug middle-end/109842] New: GCC-12 hangs on simple piece of inline assembly code 141242068 at smail dot nju.edu.cn
  2023-05-13  9:20 ` [Bug middle-end/109842] " xry111 at gcc dot gnu.org
@ 2023-05-13 10:20 ` xry111 at gcc dot gnu.org
  2023-05-13 14:17 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: xry111 at gcc dot gnu.org @ 2023-05-13 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
          Component|middle-end                  |tree-optimization
   Target Milestone|---                         |12.3
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=108684
                 CC|                            |pinskia at gcc dot gnu.org
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
It's fixed by r12-9239.  I'm not sure if it's a duplicate of PR108684 though,
so mark it FIXED.  If this is a duplicate please modify the field.

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

* [Bug tree-optimization/109842] GCC-12 hangs on simple piece of inline assembly code
  2023-05-13  9:12 [Bug middle-end/109842] New: GCC-12 hangs on simple piece of inline assembly code 141242068 at smail dot nju.edu.cn
  2023-05-13  9:20 ` [Bug middle-end/109842] " xry111 at gcc dot gnu.org
  2023-05-13 10:20 ` [Bug tree-optimization/109842] " xry111 at gcc dot gnu.org
@ 2023-05-13 14:17 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-13 14:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |DUPLICATE

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Yes it is a dup. In this case, the "Check all ssa names " part of the patch
fixes it.

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

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-13  9:12 [Bug middle-end/109842] New: GCC-12 hangs on simple piece of inline assembly code 141242068 at smail dot nju.edu.cn
2023-05-13  9:20 ` [Bug middle-end/109842] " xry111 at gcc dot gnu.org
2023-05-13 10:20 ` [Bug tree-optimization/109842] " xry111 at gcc dot gnu.org
2023-05-13 14:17 ` pinskia at gcc dot gnu.org

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