[Bug fortran/103039] [12 Regression] Segfault with openmp block within a select type block since r12-1016-g0e3b3b77e13cac76

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 18 16:40:55 GMT 2022


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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:

https://gcc.gnu.org/g:c133bdfa9e7d9225510d00dbb7270cc052e4e4ee

commit r12-7709-gc133bdfa9e7d9225510d00dbb7270cc052e4e4ee
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Fri Mar 18 17:40:22 2022 +0100

    Fortran/OpenMP: Fix privatization of associated names

    gfc_omp_predetermined_sharing cases the associate-name pointer variable
    to be OMP_CLAUSE_DEFAULT_FIRSTPRIVATE, which is fine. However, the
associated
    selector is shared. Thus, the target of associate-name pointer should not
get
    copied. (It was before but because of gfc_omp_privatize_by_reference
returning
    false, the selector was not only wrongly copied but this was also not done
    properly.)

    gcc/fortran/ChangeLog:

            PR fortran/103039
            * trans-openmp.cc (gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor):
            Only privatize pointer for associate names.

    libgomp/ChangeLog:

            PR fortran/103039
            * testsuite/libgomp.fortran/associate4.f90: New test.


More information about the Gcc-bugs mailing list