https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96141
Bug ID: 96141 Summary: Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: familiebaumanns at gmail dot com Target Milestone: --- Created attachment 48853 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48853&action=edit Source file Expected Behaviour: ============== Compile without error. Actual Behaviour: ============== internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817 If the destructor of "Data" is changed to noexcept(true) - no compile error occurs. G++-Version: ============== g++-11 (GCC) 11.0.0 20200630 (experimental) Copyright (C) 2020 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. Compiler Output: ============== g++-11 -fcoroutines -std=c++2a coroutine_error.cpp coroutine_error.cpp: In function ‘std::generator<int> Do()’: coroutine_error.cpp:280:1: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817 280 | } | ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. Extended Compiler-Output: ============== g++-11 -v -save-temps -fcoroutines -std=c++2a coroutine_error.cpp bernd@bernd-pc:/mnt/c/Users/Bernd/Desktop$ g++-11 -v -save-temps -fcoroutines -std=c++2a coroutine_error.cpp Using built-in specs. COLLECT_GCC=g++-11 COLLECT_LTO_WRAPPER=/usr/local/gcc-11/libexec/gcc/x86_64-linux-gnu/11.0.0/lto-wrapper Target: x86_64-linux-gnu Configured with: ../gcc-master/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-11 --enable-checking=release --enable-languages=c,c++ --disable-multilib --program-suffix=-11 Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20200630 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fcoroutines' '-std=c++20' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-' /usr/local/gcc-11/libexec/gcc/x86_64-linux-gnu/11.0.0/cc1plus -E -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE coroutine_error.cpp -mtune=generic -march=x86-64 -std=c++20 -fcoroutines -fpch-preprocess -o a-coroutine_error.ii ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" ignoring nonexistent directory "/usr/local/gcc-11/lib/gcc/x86_64-linux-gnu/11.0.0/../../../../x86_64-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/gcc-11/lib/gcc/x86_64-linux-gnu/11.0.0/../../../../include/c++/11.0.0 /usr/local/gcc-11/lib/gcc/x86_64-linux-gnu/11.0.0/../../../../include/c++/11.0.0/x86_64-linux-gnu /usr/local/gcc-11/lib/gcc/x86_64-linux-gnu/11.0.0/../../../../include/c++/11.0.0/backward /usr/local/gcc-11/lib/gcc/x86_64-linux-gnu/11.0.0/include /usr/local/include /usr/local/gcc-11/include /usr/local/gcc-11/lib/gcc/x86_64-linux-gnu/11.0.0/include-fixed /usr/include/x86_64-linux-gnu /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fcoroutines' '-std=c++20' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-' /usr/local/gcc-11/libexec/gcc/x86_64-linux-gnu/11.0.0/cc1plus -fpreprocessed a-coroutine_error.ii -quiet -dumpdir a- -dumpbase coroutine_error.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -std=c++20 -version -fcoroutines -o a-coroutine_error.s GNU C++20 (GCC) version 11.0.0 20200630 (experimental) (x86_64-linux-gnu) compiled by GNU C version 11.0.0 20200630 (experimental), GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C++20 (GCC) version 11.0.0 20200630 (experimental) (x86_64-linux-gnu) compiled by GNU C version 11.0.0 20200630 (experimental), GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: bb9157b4f3559041919c25088e2affde coroutine_error.cpp: In function ‘std::generator<int> Do()’: coroutine_error.cpp:280:1: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817 280 | } | ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions.