[Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 since r13-6788

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 1 20:55:32 GMT 2023


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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:07c52d1eec9671af92b7ce977b469f13a87887ad

commit r14-386-g07c52d1eec9671af92b7ce977b469f13a87887ad
Author: Jason Merrill <jason@redhat.com>
Date:   Mon May 1 10:57:20 2023 -0400

    c++: array DMI and member fn [PR109666]

    Here it turns out I also needed to adjust cfun when stepping out of the
    member function to instantiate the DMI.  But instead of adding that tweak,
    let's unify with instantiate_body and just push_to_top_level instead of
    trying to do the minimum subset of it.  There was no measurable change in
    compile time on stdc++.h.

    This should also resolve 109506 without yet another tweak.

            PR c++/109666

    gcc/cp/ChangeLog:

            * name-lookup.cc (maybe_push_to_top_level)
            (maybe_pop_from_top_level): Split out...
            * pt.cc (instantiate_body): ...from here.
            * init.cc (maybe_instantiate_nsdmi_init): Use them.
            * name-lookup.h: Declare them..

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/nsdmi-array2.C: New test.


More information about the Gcc-bugs mailing list