public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100234] New: [11/12 Regression] Coroutines ICE
@ 2021-04-23 15:39 jakub at gcc dot gnu.org
  2021-04-23 15:39 ` [Bug c++/100234] " jakub at gcc dot gnu.org
  2021-04-23 15:47 ` jakub at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-23 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100234
           Summary: [11/12 Regression] Coroutines ICE
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

Starting with r11-2183-g0f66b8486cea8668020e4bd48f261b760cb579be
the following testcase ICEs with -std=c++20 -fcoroutines:
rh1952671.C: In member function ‘K L::bar()’:
rh1952671.C:44:41: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have array_type in build_special_member_call, at
cp/call.c:9758
   44 |   K bar () { co_await foo (C(), {C()}); }
      |                                         ^
0x1a5f2ac tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.c:9687
0x958126 tree_check3(tree_node*, char const*, int, char const*, tree_code,
tree_code, tree_code)
        ../../gcc/tree.h:3343
0x94b8b3 build_special_member_call(tree_node*, tree_node*, vec<tree_node*,
va_gc, vl_embed>**, tree_node*, int, int)
        ../../gcc/cp/call.c:9758
0x9d8490 flatten_await_stmt
        ../../gcc/cp/coroutines.cc:2859

namespace std {
template <class> class initializer_list {
  int *a;
  decltype(sizeof 0) b;
};
}
struct C { C(); };
struct D { D(std::initializer_list<C>); };
namespace std {
template <typename e, typename> struct coroutine_traits : e {};
template <typename = void> struct coroutine_handle {
  operator coroutine_handle<>();
};
}
struct F {
  void await_ready();
  void await_suspend(std::coroutine_handle<>);
  void await_resume();
};
struct M {
  void await_ready() noexcept;
  template <typename h> void await_suspend(h) noexcept;
  void await_resume() noexcept;
};
struct I {
  F initial_suspend();
  auto final_suspend() noexcept { return M{}; }
};
struct K {
  struct J : public I {
    void unhandled_exception();
//    K get_return_object() { return K{}; }
  };
  using promise_type = J;
};
struct Q {
  Q(int);
  void await_ready();
  void await_resume();
  void await_suspend(std::coroutine_handle<>);
};
Q foo (C, D);
struct L {
  K bar () { co_await foo (C(), {C()}); }
};

while before that commit it has been rejected with
rh1952671.C: In member function ‘K L::bar()’:
rh1952671.C:44:5: error: no member named ‘get_return_object’ in
‘K::promise_type’ {aka ‘K::J’}
   44 |   K bar () { co_await foo (C(), {C()}); }
      |     ^~~

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

* [Bug c++/100234] [11/12 Regression] Coroutines ICE
  2021-04-23 15:39 [Bug c++/100234] New: [11/12 Regression] Coroutines ICE jakub at gcc dot gnu.org
@ 2021-04-23 15:39 ` jakub at gcc dot gnu.org
  2021-04-23 15:47 ` jakub at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-23 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.2
                 CC|                            |iains at gcc dot gnu.org

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

* [Bug c++/100234] [11/12 Regression] Coroutines ICE
  2021-04-23 15:39 [Bug c++/100234] New: [11/12 Regression] Coroutines ICE jakub at gcc dot gnu.org
  2021-04-23 15:39 ` [Bug c++/100234] " jakub at gcc dot gnu.org
@ 2021-04-23 15:47 ` jakub at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-23 15:47 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Dup.

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

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

end of thread, other threads:[~2021-04-23 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 15:39 [Bug c++/100234] New: [11/12 Regression] Coroutines ICE jakub at gcc dot gnu.org
2021-04-23 15:39 ` [Bug c++/100234] " jakub at gcc dot gnu.org
2021-04-23 15:47 ` jakub 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).