openmp: Handle non-static data members in allocate clause and other C++ allocate...
authorJakub Jelinek <jakub@redhat.com>
Fri, 30 Oct 2020 08:16:45 +0000 (09:16 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 30 Oct 2020 08:16:45 +0000 (09:16 +0100)
commit5a6b1d8ef4218a1a2ed6d43c6ee058db9c417bc8
treecb6feb912772a61d80a954d525c48a08da8aa7c4
parent973574465ca250ed9af5c229a8a3a6b05fde9ca0
openmp: Handle non-static data members in allocate clause and other C++ allocate fixes

This allows specification of non-static data members in allocate clause like it
can be specified in other privatization clauses and adds a new testcase that covers
also handling of that clause in templates.

2020-10-30  Jakub Jelinek  <jakub@redhat.com>

* semantics.c (finish_omp_clauses) <case OMP_CLAUSE_ALLOCATE>: Handle
non-static members in methods.
* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.

* c-c++-common/gomp/allocate-1.c (qux): Add another test.
* g++.dg/gomp/allocate-1.C: New test.
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/testsuite/c-c++-common/gomp/allocate-1.c
gcc/testsuite/g++.dg/gomp/allocate-1.C [new file with mode: 0644]