]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Allow classes with static members to be mappable
authorChung-Lin Tang <cltang@codesourcery.com>
Fri, 11 Mar 2022 13:50:52 +0000 (21:50 +0800)
committerChung-Lin Tang <cltang@codesourcery.com>
Fri, 11 Mar 2022 13:50:52 +0000 (21:50 +0800)
commit28ea857df2ef384627b3bc803c8a5a4ce037e6b2
tree29a313bfe5e2719e0eb9f505ba1a50b85a895aa9
parenta03a01959576337cb0cac35de6915cc2b5d9a36c
openmp: Allow classes with static members to be mappable

In OpenMP 5.x, static members are supposed to be not a barrier for a class
to be target-mapped. Remove the check for static members inside
cp_omp_mappable_type_1, and adjusts a testcase.

Merged from:
https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591449.html

gcc/cp/ChangeLog:

* decl2.cc (cp_omp_mappable_type_1): Remove requirement that all
members must be non-static; remove check for static fields.

gcc/testsuite/ChangeLog:

* g++.dg/gomp/unmappable-1.C: Adjust testcase.
gcc/cp/decl2.c
gcc/testsuite/g++.dg/gomp/unmappable-1.C