Re: Confused about coroutine behavior

2022-08-26 Thread Jonathan Wakely via Gcc
On Fri, 26 Aug 2022 at 06:56, Rebecca Ribas via Gcc wrote: > > Hi gcc list, > > I'm learning c++ coroutines but I ran into a behavior that I can't make > sense of. > > Here is the godbolt link: https://godbolt.org/z/rdPo8ceKP > > In some cases, it appears that temporaries are incorrectly freed, th

Confused about coroutine behavior

2022-08-25 Thread Rebecca Ribas via Gcc
Hi gcc list, I'm learning c++ coroutines but I ran into a behavior that I can't make sense of. Here is the godbolt link: https://godbolt.org/z/rdPo8ceKP In some cases, it appears that temporaries are incorrectly freed, the code shows test1 and test2 that works as expected, but test3 raises a "us