]> gcc.gnu.org Git - gcc.git/commit
Fortran: OpenMP/OpenACC avoid uninit access in size calc for mapping
authorTobias Burnus <tobias@codesourcery.com>
Fri, 11 Mar 2022 07:48:58 +0000 (08:48 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Fri, 11 Mar 2022 07:48:58 +0000 (08:48 +0100)
commit41bda0036ce81e7ac513f325e7b0f41ccf11cbab
tree9add88c8a39abefc167dddc6117aa9d376d2d90b
parent5e28be89665f340368e399a1f2140c96a7a79ee8
Fortran: OpenMP/OpenACC avoid uninit access in size calc for mapping

gcc/fortran/ChangeLog:

* trans-openmp.cc (gfc_trans_omp_clauses, gfc_omp_finish_clause):
Obtain size for mapping only if allocatable array is allocated.

gcc/testsuite/ChangeLog:

* gfortran.dg/goacc/array-with-dt-1.f90: Update/add comments;
remove dg-warning for 'is used uninitialized'.
* gfortran.dg/goacc/pr93464.f90: Likewise.
* gfortran.dg/goacc/array-with-dt-1a.f90: New; copied from
gfortran.dg/goacc/array-with-dt-1.f90 but run with -O0. Update
dg-warning for 'may be used uninitialized'.
* gfortran.dg/goacc/pr93464-2.f90: Likewise; copied from
gfortran.dg/goacc/pr93464.f90.
gcc/fortran/trans-openmp.cc
gcc/testsuite/gfortran.dg/goacc/array-with-dt-1.f90
gcc/testsuite/gfortran.dg/goacc/array-with-dt-1a.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/pr93464-2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/pr93464.f90
This page took 0.065922 seconds and 5 git commands to generate.