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

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

https://gcc.gnu.org/g:27521a2f4f7b859d5656e5bdd69d3f759ea4c23a

commit r14-7213-g27521a2f4f7b859d5656e5bdd69d3f759ea4c23a
Author: Jason Merrill <ja...@redhat.com>
Date:   Mon Dec 18 15:47:10 2023 -0500

    c++: __class_type_info and modules [PR113038]

    Doing a dynamic_cast in both TUs broke because we were declaring a new
    __class_type_info in _b that conflicted with the one imported in the global
    module from _a.  It seems clear to me that any new class declaration in
    the global module should merge with an imported definition, but for GCC 14
    let's just fix this for the specific case of __class_type_info.

            PR c++/113038

    gcc/cp/ChangeLog:

            * name-lookup.cc (lookup_elaborated_type): Look for bindings
            in the global namespace in the ABI namespace.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/pr106304_b.C: Add dynamic_cast.

Reply via email to