public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101118] coroutines: unexpected ODR warning for coroutine frame type in LTO builds Date: Sun, 30 Apr 2023 08:27:32 +0000 [thread overview] Message-ID: <bug-101118-4-yxTRHldwa0@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101118-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101118 --- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>: https://gcc.gnu.org/g:b7e75cdb218f25708b8b1aa3f4b138d88187491f commit r12-9501-gb7e75cdb218f25708b8b1aa3f4b138d88187491f Author: Iain Sandoe <iain@sandoe.co.uk> Date: Thu Mar 30 13:14:23 2023 +0530 c++,coroutines: Stabilize names of promoted slot vars [PR101118]. When we need to 'promote' a value (i.e. store it in the coroutine frame) it is given a frame entry name. This was based on the DECL_UID for slot vars. However, when LTO is used, the names from multiple TUs become visible at the same time, and the DECL_UIDs usually differ between units. This leads to a "ODR mismatch" warning for the frame type. The fix here is to use the current promoted temporaries count to produce the name, this is stable between TUs and computed per coroutine. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> PR c++/101118 gcc/cp/ChangeLog: * coroutines.cc (flatten_await_stmt): Use the current count of promoted temporaries to build a unique name for the frame entries. (cherry picked from commit fc4cde2e6aa4d6ebdf7f70b7b4359fb59a1915ae)
next prev parent reply other threads:[~2023-04-30 8:27 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-18 7:43 [Bug c++/101118] New: " nilsgladitz at gmail dot com 2021-06-18 10:26 ` [Bug c++/101118] " rguenth at gcc dot gnu.org 2021-06-18 10:46 ` iains at gcc dot gnu.org 2021-06-18 15:18 ` nilsgladitz at gmail dot com 2021-06-18 15:39 ` iains at gcc dot gnu.org 2023-03-03 16:06 ` john at drouhard dot dev 2023-03-03 16:26 ` hubicka at gcc dot gnu.org 2023-03-03 16:33 ` iains at gcc dot gnu.org 2023-03-03 17:06 ` hubicka at ucw dot cz 2023-03-03 17:10 ` iains at gcc dot gnu.org 2023-03-03 19:21 ` iains at gcc dot gnu.org 2023-03-03 19:29 ` iains at gcc dot gnu.org 2023-03-03 20:59 ` iains at gcc dot gnu.org 2023-03-07 12:53 ` hubicka at ucw dot cz 2023-03-07 15:04 ` iains at gcc dot gnu.org 2023-03-07 16:18 ` hubicka at ucw dot cz 2023-03-07 16:27 ` iains at gcc dot gnu.org 2023-04-01 5:28 ` cvs-commit at gcc dot gnu.org 2023-04-30 8:27 ` cvs-commit at gcc dot gnu.org [this message] 2023-05-16 19:07 ` cvs-commit at gcc dot gnu.org 2023-05-16 19:11 ` iains at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-101118-4-yxTRHldwa0@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).