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

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

https://gcc.gnu.org/g:53690a84a35b905403126be66210d21e89f53ac6

commit r15-9680-g53690a84a35b905403126be66210d21e89f53ac6
Author: Nathaniel Shead <nathanielosh...@gmail.com>
Date:   Mon Apr 21 20:40:29 2025 +1000

    c++: Fix OpenMP support with C++20 modules [PR119864]

    In r15-2799-gf1bfba3a9b3f31, a new kind of global constructor was added.
    Unfortunately this broke C++20 modules, as both the host and target
    constructors were given the same mangled name.  This patch ensures that
    only the host constructor gets the module name mangling for now, and
    stops forcing the creation of the target constructor even when no such
    initialization is required.

            PR c++/119864

    gcc/cp/ChangeLog:

            * decl2.cc (start_objects): Only use module initialized for
            host.
            (c_parse_final_cleanups): Don't always create an OMP offload
            init function in modules.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/openmp-1.C: New test.

    Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>
    Reviewed-by: Jason Merrill <ja...@redhat.com>
    (cherry picked from commit 79b7e37ea3fbbc43958190f69f6da3be3d809c9c)

Reply via email to