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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathaniel Shead <nsh...@gcc.gnu.org>:

https://gcc.gnu.org/g:85409b9d6a29392d33f3fbac40c641eeda22062a

commit r16-3822-g85409b9d6a29392d33f3fbac40c641eeda22062a
Author: Nathaniel Shead <nathanielosh...@gmail.com>
Date:   Fri Sep 12 22:50:39 2025 +1000

    c++/modules: Fix missed unwrapping of STAT_HACK in ADL [PR121893]

    My r16-3559-gc2e567a6edb563 reworked ADL for modules, including a change
    to allow seeing module-linkage declarations if they only exist on the
    instantiation path.  This caused a crash however as I neglected to
    unwrap the stat hack wrapper when we were happy to see all declarations,
    allowing search_adl to add non-functions to the overload set.

            PR c++/121893

    gcc/cp/ChangeLog:

            * name-lookup.cc (name_lookup::adl_namespace_fns): Unwrap the
            STAT_HACK also when on_inst_path.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/adl-10_a.C: New test.
            * g++.dg/modules/adl-10_b.C: New test.

    Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>

Reply via email to