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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <bur...@gcc.gnu.org>:

https://gcc.gnu.org/g:92a5de3df2dc958d6b3d18a0466189ad31f5ae79

commit r13-2089-g92a5de3df2dc958d6b3d18a0466189ad31f5ae79
Author: Tobias Burnus <tob...@codesourcery.com>
Date:   Wed Aug 17 14:17:08 2022 +0200

    OpenMP/C++: Allow classes with static members to be mappable [PR104493]

    As this is the last lang-specific user of the omp_mappable_type hook,
    the hook is removed, keeping only a generic omp_mappable_type for
    incomplete types (or error_node).

            PR c++/104493

    gcc/c/ChangeLog:

            * c-decl.cc (c_decl_attributes, finish_decl): Call
omp_mappable_type
            instead of removed langhook.
            * c-typeck.cc (c_finish_omp_clauses): Likewise.

    gcc/cp/ChangeLog:

            * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Remove.
            * cp-tree.h (cp_omp_mappable_type,
cp_omp_emit_unmappable_type_notes):
            Remove.
            * decl2.cc (cp_omp_mappable_type_1, cp_omp_mappable_type,
            cp_omp_emit_unmappable_type_notes): Remove.
            (cplus_decl_attributes): Call omp_mappable_type instead of
            removed langhook.
            * decl.cc (cp_finish_decl): Likewise; call
cxx_incomplete_type_inform
            in lieu of cp_omp_emit_unmappable_type_notes.
            * semantics.cc (finish_omp_clauses): Likewise.

    gcc/ChangeLog:

            * gimplify.cc (omp_notice_variable): Call omp_mappable_type
            instead of removed langhook.
            * omp-general.h (omp_mappable_type): New prototype.
            * omp-general.cc (omp_mappable_type):  New; moved from ...
            * langhooks.cc (lhd_omp_mappable_type): ... here.
            * langhooks-def.h (lhd_omp_mappable_type,
            LANG_HOOKS_OMP_MAPPABLE_TYPE): Remove.
            (LANG_HOOKS_FOR_TYPES_INITIALIZER): Remote the latter.
            * langhooks.h (struct lang_hooks_for_types): Remove
            omp_mappable_type.

    gcc/testsuite/ChangeLog:

            * g++.dg/gomp/unmappable-1.C: Remove dg-error; remove dg-note no
            longer shown as TYPE_MAIN_DECL is NULL.
            * c-c++-common/gomp/map-incomplete-type.c: New test.

    Co-authored-by: Chung-Lin Tang <clt...@codesourcery.com>

Reply via email to