[Bug c++/108286] [GCC 12/13] OpenMP Target directive causes internal compiler error

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 5 11:01:07 GMT 2023


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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:29c3218618ef6177dc33871b26c8fbd9b21eabe1

commit r13-5006-g29c3218618ef6177dc33871b26c8fbd9b21eabe1
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Jan 5 11:57:30 2023 +0100

    openmp: Fix up finish_omp_target_clauses [PR108286]

    The comment in the loop says that we shouldn't add a map clause if such
    a clause exists already, but the loop was actually using OMP_CLAUSE_DECL
    on any clause.  Target construct can have various clauses which don't
    have OMP_CLAUSE_DECL at all (e.g. nowait, device or if) or clause
    where it means something different (e.g. privatization clauses, allocate,
    depend).

    So, only check OMP_CLAUSE_DECL on OMP_CLAUSE_MAP clauses.

    2023-01-05  Jakub Jelinek  <jakub@redhat.com>

            PR c++/108286
            * semantics.cc (finish_omp_target_clauses): Ignore clauses other
than
            OMP_CLAUSE_MAP.

            * testsuite/libgomp.c++/pr108286.C: New test.


More information about the Gcc-bugs mailing list