public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96141] New: Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817
@ 2020-07-09 21:20 familiebaumanns at gmail dot com
  2020-07-09 21:26 ` [Bug c++/96141] " familiebaumanns at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: familiebaumanns at gmail dot com @ 2020-07-09 21:20 UTC (permalink / raw)
  To: gcc-bugs

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.

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

* [Bug c++/96141] Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817
  2020-07-09 21:20 [Bug c++/96141] New: Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817 familiebaumanns at gmail dot com
@ 2020-07-09 21:26 ` familiebaumanns at gmail dot com
  2020-07-09 21:28 ` familiebaumanns at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: familiebaumanns at gmail dot com @ 2020-07-09 21:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Bernd Baumanns <familiebaumanns at gmail dot com> ---
Here you can see the error at godbolt:
https://godbolt.org/z/PGarTE

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

* [Bug c++/96141] Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817
  2020-07-09 21:20 [Bug c++/96141] New: Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817 familiebaumanns at gmail dot com
  2020-07-09 21:26 ` [Bug c++/96141] " familiebaumanns at gmail dot com
@ 2020-07-09 21:28 ` familiebaumanns at gmail dot com
  2020-07-12  9:30 ` [Bug c++/96141] ICE in gimplify: " familiebaumanns at gmail dot com
  2021-07-18 23:48 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: familiebaumanns at gmail dot com @ 2020-07-09 21:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Bernd Baumanns <familiebaumanns at gmail dot com> ---
Created attachment 48854
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48854&action=edit
II File

II File

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

* [Bug c++/96141] ICE in gimplify: Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817
  2020-07-09 21:20 [Bug c++/96141] New: Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817 familiebaumanns at gmail dot com
  2020-07-09 21:26 ` [Bug c++/96141] " familiebaumanns at gmail dot com
  2020-07-09 21:28 ` familiebaumanns at gmail dot com
@ 2020-07-12  9:30 ` familiebaumanns at gmail dot com
  2021-07-18 23:48 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: familiebaumanns at gmail dot com @ 2020-07-12  9:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Bernd Baumanns <familiebaumanns at gmail dot com> ---
Is there something missing in that if? What must be changed?

This is assert fails:

/* ??? If this is a local variable, and it has not been seen in any
     outer BIND_EXPR, then it's probably the result of a duplicate
     declaration, for which we've already issued an error.  It would
     be really nice if the front end wouldn't leak these at all.
     Currently the only known culprit is C++ destructors, as seen
     in g++.old-deja/g++.jason/binding.C.  */
  if (VAR_P (decl)
      && !DECL_SEEN_IN_BIND_EXPR_P (decl)
      && !TREE_STATIC (decl) && !DECL_EXTERNAL (decl)
      && decl_function_context (decl) == current_function_decl)
    {
      gcc_assert (seen_error ());
      return GS_ERROR;
    }

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

* [Bug c++/96141] ICE in gimplify: Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817
  2020-07-09 21:20 [Bug c++/96141] New: Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817 familiebaumanns at gmail dot com
                   ` (2 preceding siblings ...)
  2020-07-12  9:30 ` [Bug c++/96141] ICE in gimplify: " familiebaumanns at gmail dot com
@ 2021-07-18 23:48 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-18 23:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This was fixed on the trunk and for GCC 10.3 with PR 95822. So marking this as
a dup.

Note I had to change one thing slightly:
                        constexpr COROUTINE_IMPL_NS::suspend_always
final_suspend() const noexcept(true) { return {}; }


Notice the noexcept(true) there.

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

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

end of thread, other threads:[~2021-07-18 23:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 21:20 [Bug c++/96141] New: Coroutine and noexcept(false) destructor cause: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2817 familiebaumanns at gmail dot com
2020-07-09 21:26 ` [Bug c++/96141] " familiebaumanns at gmail dot com
2020-07-09 21:28 ` familiebaumanns at gmail dot com
2020-07-12  9:30 ` [Bug c++/96141] ICE in gimplify: " familiebaumanns at gmail dot com
2021-07-18 23:48 ` 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).