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

--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <ia...@gcc.gnu.org>:

https://gcc.gnu.org/g:fc4cde2e6aa4d6ebdf7f70b7b4359fb59a1915ae

commit r13-6964-gfc4cde2e6aa4d6ebdf7f70b7b4359fb59a1915ae
Author: Iain Sandoe <i...@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 <i...@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.
  • [Bug c++/101118] coroutines: un... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to