[Bug c++/98118] [10/11 Regression][coroutines] ICE with coroutine with parameter with non-trivial destructor since r10-6876-gdc192bbdd0442f75

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 3 13:16:37 GMT 2020


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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-12-03
   Target Milestone|---                         |10.3
            Summary|[coroutines] ICE with       |[10/11
                   |coroutine with parameter    |Regression][coroutines] ICE
                   |with non-trivial destructor |with coroutine with
                   |                            |parameter with non-trivial
                   |                            |destructor since
                   |                            |r10-6876-gdc192bbdd0442f75
             Status|UNCONFIRMED                 |NEW
                 CC|                            |iains at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-6876-gdc192bbdd0442f75 for:

$ cat pr98118.C
namespace std {
inline namespace __n4861 {
template <typename _Result, typename> struct coroutine_traits : _Result {};
template <typename = void> struct coroutine_handle;
template <> struct coroutine_handle<> {};
template <typename> struct coroutine_handle : coroutine_handle<> {};
struct suspend_never {
  bool await_ready();
  void await_suspend(coroutine_handle<>);
  void await_resume();
};
} // namespace __n4861
} // namespace std
struct fire_and_forget {
  struct promise_type {
    fire_and_forget get_return_object();
    std::suspend_never initial_suspend();
    std::suspend_never final_suspend();
    void return_void();
    void unhandled_exception();
  };
};
struct bug {
  ~bug();
};
fire_and_forget f(bug) { co_return; }


More information about the Gcc-bugs mailing list