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

            Bug ID: 125997
           Summary: coroutine ICE
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: c++-coroutines, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Originally reported downstream at https://bugs.gentoo.org/977697.

```
$ g++ cclFnL7v.ii -std=gnu++20 -c
cclFnL7v.ii: In function ‘void logic_per_ebuild(_Z16logic_per_ebuildv.Frame*)’:
cclFnL7v.ii:53:11: internal compiler error: in gimplify_var_or_parm_decl, at
gimplify.cc:3267
   53 |       move(_res);
      |       ~~~~^~~~~~
0x55f5a287db10 internal_error(char const*, ...)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/diagnostic-global-context.cc:787
0x55f5a287dcb3 fancy_abort(char const*, int, char const*)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/diagnostics/context.cc:1813
0x55f5a0ba9f3d gimplify_var_or_parm_decl
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:3267
0x55f5a2b5d09d gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:20841
0x55f5a2c2aca1 gimplify_expr
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:21483
0x55f5a2c2aca1 gimplify_arg(tree_node**, gimple**, unsigned long, bool)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:3753
0x55f5a2c2aca1 gimplify_call_expr
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:4767
0x55f5a2b5df11 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:20343
0x55f5a2b7be18 gimplify_modify_expr
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:7296
0x55f5a2b5d0ea gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:20374
0x55f5a2b5e191 gimplify_stmt(tree_node**, gimple**)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:8539
0x55f5a2b5e191 gimplify_cleanup_point_expr
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:8266
0x55f5a2b5e191 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:20773
0x55f5a2b5e3b5 gimplify_stmt(tree_node**, gimple**)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:8539
0x55f5a2b5e3b5 gimplify_statement_list
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:2135
0x55f5a2b5e3b5 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:20825
0x55f5a2b5cb99 gimplify_stmt(tree_node**, gimple**)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:8539
0x55f5a37bbcdb gimplify_bind_expr
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:1530
0x55f5a2b5e54d gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:20575
0x55f5a2b5cb99 gimplify_stmt(tree_node**, gimple**)
       
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/gimplify.cc:8539
/usr/libexec/gcc/x86_64-pc-linux-gnu/17/cc1plus -fpreprocessed cclFnL7v.ii
-quiet -dumpbase cclFnL7v.ii -dumpbase-ext .ii -mtune=generic -march=x86-64
-mtls-dialect=gnu2 -std=gnu++20 -foffload-options=-fno-stack-protector
-fcf-protection -foffload-options=-fcf-protection=none -o /tmp/cce20J1V.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

```

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/17/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-17.0.9999/work/gcc-17.0.9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/17
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/17/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/17
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/17/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/17/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/17/include/g++-v17
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/17/python
--enable-libphobos --enable-objc-gc
--enable-languages=c,c++,d,objc,obj-c++,fortran,ada,rust --enable-obsolete
--enable-secureplt --disable-werror --with-system-zlib --enable-nls
--without-included-gettext --disable-libunwind-exceptions
--enable-checking=yes,extra,rtl --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 17.0.9999 p, commit
cc795e9d4e1091a57e0f9815fbe3ba3a6e9d4d6c' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch
--enable-linker-build-id --enable-libada --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --with-tls=gnu2 --enable-multilib
--with-multilib-list=m32,mx32,m64 --disable-fixed-point --with-abi=m64
--enable-targets=all --enable-offload-defaulted
--enable-offload-targets=nvptx-none --enable-libgomp --disable-libssp
--enable-cet --disable-systemtap --enable-valgrind-annotations
--enable-valgrind-interop --disable-vtable-verify --disable-libvtv --with-zstd
--without-isl --enable-default-pie --enable-host-pie --enable-host-bind-now
--enable-default-ssp --disable-fixincludes
--with-gxx-libcxx-include-dir=/usr/include/c++/v1
--with-build-config='bootstrap-O3 bootstrap-lto bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260623 (experimental)
c23f20c10d89af4f74346c23061b489ef87c09db (Gentoo 17.0.9999 p, commit
cc795e9d4e1091a57e0f9815fbe3ba3a6e9d4d6c)
```

Reply via email to