https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99576
Nils Gladitz <nilsgladitz at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nilsgladitz at gmail dot com --- Comment #1 from Nils Gladitz <nilsgladitz at gmail dot com> --- I am seeing issues with lambdas and coroutines that I can't quite explain yet. Specifically reference counting objects capture copied (e.g. std::shared_ptr) seemed to decrease their reference count more often than they should. Found this issue which didn't quite seem to match but trying Paweł Wegner's test case I see something that may explain some weirdness (haven't fully digested the test case or disregarded the possibility that it is my fault though). With vanilla gcc 10.2.0 I am seeing what Paweł observed: START TASK Foo() ~Foo() IN LAMBDA With vanilla 10.3.0 and 11.1.0 I however see the following: START TASK Foo() IN LAMBDA ~Foo() ~Foo() i.e. the Foo destructor now gets called later but apparently twice