public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95510] New: [coroutines] ICE with consteval operator co_await
@ 2020-06-03 18:35 bruck.michael at gmail dot com
  2020-06-04 19:11 ` [Bug c++/95510] " iains at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bruck.michael at gmail dot com @ 2020-06-03 18:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95510
           Summary: [coroutines] ICE with consteval operator co_await
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bruck.michael at gmail dot com
  Target Milestone: ---

https://gcc.godbolt.org/z/JAaXAA

#include <coroutine>

struct dummy
{
    struct promise_type
    {
        std::suspend_always initial_suspend() const noexcept { return {}; }
        std::suspend_never final_suspend() const noexcept { return {}; }
        dummy get_return_object() const noexcept { return {}; }
        void return_void() const noexcept {}
        void unhandled_exception() const noexcept {}
    };
};

struct awaitable {};

consteval auto operator co_await(awaitable) noexcept
{
    return std::suspend_always{};
}

dummy foo()
{ 
    co_await awaitable{};
}

int main() {}

---
source>: In function 'dummy foo()':
<source>:24:24: internal compiler error: in extract_call_expr, at
cp/call.c:6634
   24 |     co_await awaitable{};
      |                        ^

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

end of thread, other threads:[~2020-06-24 20:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 18:35 [Bug c++/95510] New: [coroutines] ICE with consteval operator co_await bruck.michael at gmail dot com
2020-06-04 19:11 ` [Bug c++/95510] " iains at gcc dot gnu.org
2020-06-21 18:36 ` iains at gcc dot gnu.org
2020-06-24 20:53 ` iains 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).