public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102883] New: Calling co_yield with initializer list containing shared_ptr causes internal compiler error
@ 2021-10-21 15:34 brad.nemanich at amd dot com
2021-10-22 6:16 ` [Bug c++/102883] " rguenth at gcc dot gnu.org
2021-10-25 11:41 ` iains at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: brad.nemanich at amd dot com @ 2021-10-21 15:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102883
Bug ID: 102883
Summary: Calling co_yield with initializer list containing
shared_ptr causes internal compiler error
Product: gcc
Version: 10.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: brad.nemanich at amd dot com
Target Milestone: ---
When calling co_yield on an intializer_list that contains a shared_ptr, gcc
10.3 is failing with `internal compiler error: in build_special_member_call, at
cp/call.c:9787`.
Below is a short example that causes the error.
```
#include <memory>
#include <coroutine>
template <std::movable T>
class Generator
{
public:
struct promise_type
{
Generator<T> get_return_object();
void return_void() noexcept { }
void unhandled_exception() noexcept;
static std::suspend_always initial_suspend() noexcept { return {}; }
static std::suspend_always final_suspend() noexcept { return {}; }
std::suspend_always yield_value(T v) noexcept;
};
};
struct MyStruct
{
MyStruct(std::initializer_list<std::shared_ptr<int>> dst);
};
Generator<MyStruct> add(std::shared_ptr<int> dest)
{
//MyStruct tmp({dest});
//co_yield tmp;
co_yield MyStruct({dest});
}
```
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/102883] Calling co_yield with initializer list containing shared_ptr causes internal compiler error
2021-10-21 15:34 [Bug c++/102883] New: Calling co_yield with initializer list containing shared_ptr causes internal compiler error brad.nemanich at amd dot com
@ 2021-10-22 6:16 ` rguenth at gcc dot gnu.org
2021-10-25 11:41 ` iains at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-22 6:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102883
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Ever confirmed|0 |1
CC| |iains at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-10-22
Known to fail| |11.2.1, 12.0
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed also on the GCC 11 branch and trunk.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/102883] Calling co_yield with initializer list containing shared_ptr causes internal compiler error
2021-10-21 15:34 [Bug c++/102883] New: Calling co_yield with initializer list containing shared_ptr causes internal compiler error brad.nemanich at amd dot com
2021-10-22 6:16 ` [Bug c++/102883] " rguenth at gcc dot gnu.org
@ 2021-10-25 11:41 ` iains at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: iains at gcc dot gnu.org @ 2021-10-25 11:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102883
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
another dup of 98056...
*** 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-10-25 11:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 15:34 [Bug c++/102883] New: Calling co_yield with initializer list containing shared_ptr causes internal compiler error brad.nemanich at amd dot com
2021-10-22 6:16 ` [Bug c++/102883] " rguenth at gcc dot gnu.org
2021-10-25 11:41 ` 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).