]> gcc.gnu.org Git - gcc.git/commit
openmp: Ensure copy ctor for composite distribute parallel for class iterators is...
authorJakub Jelinek <jakub@redhat.com>
Tue, 26 May 2020 07:35:21 +0000 (09:35 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 26 May 2020 07:35:21 +0000 (09:35 +0200)
commitf1f862aec2c3b93dbd6adfc35b0e1b6034e59c21
tree17585550346141aee0230a55878d86d63504b279
parent1c7f8cbcc7f77d6956624f2bb455c33f253524fd
openmp: Ensure copy ctor for composite distribute parallel for class iterators is instantiated [PR95197]

During gimplification omp_finish_clause langhook is called in several places
to add the language specific info to the clause like what default/copy ctors,
dtors and assignment operators should be used.

Unfortunately, if it refers to some not yet instantiated method, during
gimplification it is too late and the methods will not be instantiated
anymore.  For other cases, the genericizer has code to detect those and
instantiate whatever is needed, this change adds the same for
distribute parallel for class iterators where we under the hood need
a copy constructor for the iterator to implement it.

2020-05-26  Jakub Jelinek  <jakub@redhat.com>

PR c++/95197
* gimplify.c (find_combined_omp_for): Move to omp-general.c.
* omp-general.h (find_combined_omp_for): Declare.
* omp-general.c: Include tree-iterator.h.
(find_combined_omp_for): New function, moved from gimplify.c.

* cp-gimplify.c: Include omp-general.h.
(cp_genericize_r) <case OMP_DISTRIBUTE>: For class iteration
variables in composite distribute parallel for, instantiate copy
ctor of their types.
gcc/cp/cp-gimplify.c
gcc/gimplify.c
gcc/omp-general.c
gcc/omp-general.h
This page took 0.062948 seconds and 6 git commands to generate.