[Bug c++/95197] libgomp/testsuite/libgomp.c++/for-27.C fails with -std=c++17

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 26 07:39:15 GMT 2020


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

--- Comment #4 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:f1f862aec2c3b93dbd6adfc35b0e1b6034e59c21

commit r11-629-gf1f862aec2c3b93dbd6adfc35b0e1b6034e59c21
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue May 26 09:35:21 2020 +0200

    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.


More information about the Gcc-bugs mailing list