public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100611] New: coroutines: destructor called too many times for coroutine lambda stored object
@ 2021-05-15 12:28 nilsgladitz at gmail dot com
  2021-05-15 12:51 ` [Bug c++/100611] " nilsgladitz at gmail dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: nilsgladitz at gmail dot com @ 2021-05-15 12:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100611
           Summary: coroutines: destructor called too many times for
                    coroutine lambda stored object
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nilsgladitz at gmail dot com
  Target Milestone: ---

Created attachment 50816
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50816&action=edit
test case

Given the attached test case compiled and run with e.g.
 g++ test.cpp -std=c++20 -fcoroutines && ./a.out

produces the output:
 Foo(23) 0x55c938eb5ed4
 Foo(const& 23) 0x55c938eb5ee4
 ~Foo(23) 0x55c938eb5ee0
 ~Foo(23) 0x55c938eb5ee4
 ~Foo(23) 0x55c938eb5ed4

Indicating that "Foo" is constructed more often than it gets destructed.

This may be a variation of or related to bug 99576 which my test case is based
on.

Bug 99576 seems to be observable in 10.2 while this new issue seems to be
observable in 10.3 and 11.1.

Bisecting the gcc-10 release branch the dividing commit seems to be:
 commit f43a1b1d1718969423337190ddbbbc9037c67783
 Author: Iain Sandoe <iain@sandoe.co.uk>
 Date:   Sun Jul 19 18:39:21 2020 +0100

     coroutines: Correct frame capture of compiler temps [PR95591+4].

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-05-23 10:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 12:28 [Bug c++/100611] New: coroutines: destructor called too many times for coroutine lambda stored object nilsgladitz at gmail dot com
2021-05-15 12:51 ` [Bug c++/100611] " nilsgladitz at gmail dot com
2021-05-23  9:01 ` jehelset at gmail dot com
2021-06-10 14:15 ` davidledger at live dot com.au
2021-08-09  0:41 ` davidledger at live dot com.au
2021-10-01 20:14 ` iains at gcc dot gnu.org
2021-10-01 20:37 ` iains at gcc dot gnu.org
2022-12-04 10:41 ` cvs-commit at gcc dot gnu.org
2024-04-04 19:25 ` vipcxj at 126 dot com
2024-04-04 19:39 ` avi at scylladb dot com
2024-04-04 19:40 ` avi at scylladb dot com
2024-05-23  4:23 ` vipcxj at 126 dot com
2024-05-23 10:58 ` redi 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).