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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathan Sidwell <nat...@gcc.gnu.org>:

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

commit r11-7271-gd8889c99aab4b599aa7ceb7079e69a9766171336
Author: Nathan Sidwell <nat...@acm.org>
Date:   Wed Feb 17 10:43:21 2021 -0800

    c++: Macros need to be GTY-reachable [PR 99023]

    I'd missed that macros were allocated from GC storage, and that they can
    become unattached from an identifier, and therefore not GC-reachable.
    And then bad things happen.   Fixed by making the module machinery's
    reference vector a GC root.

            PR c++/99023
            gcc/cp/
            * module.cc (struct macro_export): Add GTY markers.
            (macro_exports): Likewise, us a va_gc Vector.
            gcc/testsuite/
            * g++.dg/modules/pr99023_a.H: New.
            * g++.dg/modules/pr99023_b.H: New.

Reply via email to