[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 Arsen Arsenović changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW |RESOLVED CC||arsen at gcc dot gnu.org --- Comment #12 from Arsen Arsenović --- indeed - this is resolved *** This bug has been marked as a duplicate of bug 101367 ***
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 --- Comment #11 from Jonathan Wakely --- The fix is in 13.1
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 --- Comment #10 from vipcxj at 126 dot com --- The gcc version in build-essential for ubuntu22 is 11.4. The latest gcc in ubuntu22 is 12.3. The latest gcc in ppa:ubuntu-toolchain-r/test is 13.1. To use gcc 13.2.1, we have to compile it from source~
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 --- Comment #9 from Avi Kivity --- At least, on 13.2.1. Maybe a backport is required.
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 --- Comment #8 from Avi Kivity --- Congratulations on getting the account! The bug is fixed though.
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 vipcxj at 126 dot com changed: What|Removed |Added CC||vipcxj at 126 dot com --- Comment #7 from vipcxj at 126 dot com --- Today I got an account here to report a bug, and realized that the bug was reported 3 years ago. The version of gcc I'm using is 12.3.0, and it looks like this bug hasn't been fixed in 3 years~
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 --- Comment #6 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:58a7b1e354530d8dfe7d8fb859c8b8b5a9140f1f commit r13-4479-g58a7b1e354530d8dfe7d8fb859c8b8b5a9140f1f Author: Iain Sandoe Date: Wed Nov 30 17:05:56 2022 + coroutines: Do not promote temporaries that will be elided. We usually need to 'promote' (i.e. save to the coroutine frame) any temporary variable that is in a target expression that must persist across an await expression. However, if the TE is just used as a direct initializer for another object it will be elided - and we should not promote it since that would lead to a DTOR call for something that is never constructed. Since we now have a mechanism to tell if TEs will be elided, use that. Although the PRs referenced initially appear to be different issues, they all stem from this. Co-Authored-By: Adrian Perl Signed-off-by: Iain Sandoe PR c++/100611 PR c++/101367 PR c++/101976 PR c++/99576 gcc/cp/ChangeLog: * coroutines.cc (find_interesting_subtree): Do not promote temporaries that are only used as direct initializers for some other object. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr100611.C: New test. * g++.dg/coroutines/pr101367.C: New test. * g++.dg/coroutines/pr101976.C: New test. * g++.dg/coroutines/pr99576_1.C: New test. * g++.dg/coroutines/pr99576_2.C: New test.
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 Iain Sandoe changed: What|Removed |Added CC||victor.burckel at gmail dot com --- Comment #5 from Iain Sandoe --- *** Bug 101243 has been marked as a duplicate of this bug. ***
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 Iain Sandoe changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed||2021-10-01
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 --- Comment #4 from David Ledger --- It still seems like a bug though.
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 David Ledger changed: What|Removed |Added CC||davidledger at live dot com.au --- Comment #3 from David Ledger --- Ah, yeah this seems to be the same: https://godbolt.org/z/8r8oGG4z5
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 John Eivind Helset changed: What|Removed |Added CC||jehelset at gmail dot com --- Comment #2 from John Eivind Helset --- Maybe related: https://godbolt.org/z/vsc8MYTcn In my case it seemed like co_awaiting expressions that involved compiler-generator constructors binding references to pr-values was problematic, or something along these lines. Was a problem on 11.1. Couldn't reproduce on 10.2.
[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611 --- Comment #1 from Nils Gladitz --- (In reply to Nils Gladitz from comment #0) > Indicating that "Foo" is constructed more often than it gets destructed. Sorry that of course was supposed to read: Indicating that "Foo" is destructed more often than it gets constructed.