public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114142] New: [coroutines]: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have reference_type in lookup_base, at cp/search.cc:252
@ 2024-02-27 23:07 ldalessandro at gmail dot com
  2024-02-27 23:09 ` [Bug c++/114142] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: ldalessandro at gmail dot com @ 2024-02-27 23:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114142
           Summary: [coroutines]: internal compiler error: tree check:
                    expected record_type or union_type or qual_union_type,
                    have reference_type in lookup_base, at
                    cp/search.cc:252
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ldalessandro at gmail dot com
  Target Milestone: ---

```
  #include <coroutine>

  struct Bar {};

  struct Task
  {
      struct promise_type
      {
          promise_type(Bar&) {}
          std::suspend_never initial_suspend() { return {}; }
          std::suspend_never final_suspend() noexcept { return {}; }
          void return_void() {}
          void unhandled_exception() {}
          Task get_return_object() { return {}; }
      };
  };

  struct Foo : Bar {
      Task foo() {
          co_await std::suspend_always();
          co_return;
      }
  };

  int main()
  {
      Foo x;
      x.foo();
  }
```

When I try and return a Task from a Derived member function and set the
promise's first parameter to the Base& I see this ICE.

In 13.2 this is a rejects-valid.

Current live example https://godbolt.org/z/9EceW8boz.

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

* [Bug c++/114142] [coroutines]: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have reference_type in lookup_base, at cp/search.cc:252
  2024-02-27 23:07 [Bug c++/114142] New: [coroutines]: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have reference_type in lookup_base, at cp/search.cc:252 ldalessandro at gmail dot com
@ 2024-02-27 23:09 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-27 23:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>In 13.2 this is a rejects-valid.

It might be only ICEing when checking is turned on which it is for the trunk
(normally).

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

end of thread, other threads:[~2024-02-27 23:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 23:07 [Bug c++/114142] New: [coroutines]: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have reference_type in lookup_base, at cp/search.cc:252 ldalessandro at gmail dot com
2024-02-27 23:09 ` [Bug c++/114142] " 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).