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

            Bug ID: 128525
           Summary: internal compiler error: in verify_stmt_tree_r, at
                    cp/tree.cc
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 0599jiangyc at gmail dot com
  Target Milestone: ---

The following code:
```cpp
#include <coroutine>

struct future {
  ~future ();
  struct promise_type {
    future get_return_object () { return {}; }
    std::suspend_never initial_suspend () { return {}; }
    std::suspend_never final_suspend () noexcept { return {}; }
    void return_void () {}
    void unhandled_exception () {}
  };
  bool await_ready () { return false; }
  void await_suspend (std::coroutine_handle<>) {}
  int await_resume () { return 42; }
};

future failcase () {
  co_await ({ auto x = future{}; x; });
}
```

Resulted in this output:
```
<source>:19:1: internal compiler error: in verify_stmt_tree_r, at
cp/tree.cc:3117
```

Trunk reproducer (`-std=c++20`): https://godbolt.org/z/8dn44G5W5

Reply via email to