[Bug libstdc++/95917] coroutine functions leak under freestanding mode causing dependencies and binary bloat.

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 20 10:38:04 GMT 2020


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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:94fd05f1f76faca9dc9033b55d44c960155d38e9

commit r11-4120-g94fd05f1f76faca9dc9033b55d44c960155d38e9
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Oct 20 11:19:58 2020 +0100

    libstdc++: Define noop coroutine details private and inline [PR 95917]

    This moves the __noop_coro_frame type, the __noop_coro_fr global
    variable, and the __dummy_resume_destroy function from namespace scope,
    replacing them with private members of the specialization
    coroutine_handle<noop_coroutine_promise>.

    The function and variable are also declared inline, so that they
    generate no code unless used.

    libstdc++-v3/ChangeLog:

            PR libstdc++/95917
            * include/std/coroutine (__noop_coro_frame): Replace with
            noop_coroutine_handle::__frame.
            (__dummy_resume_destroy): Define inline in __frame.
            (__noop_coro_fr): Replace with noop_coroutine_handle::_S_fr
            and define as inline.
            * testsuite/18_support/coroutines/95917.cc: New test.


More information about the Gcc-bugs mailing list