diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2022-11-04 11:20:24 +0100 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2022-11-04 11:20:24 +0100 |
commit | f9d5362918ef7aa6f840ac48ccb8897a09fe99f1 (patch) | |
tree | 35a7774d0177a403b6b6bdcc05dd076fd827fb9a /gcc | |
parent | ac4836203ad97b642b88defdc2f986a3c356201b (diff) | |
download | gcc-f9d5362918ef7aa6f840ac48ccb8897a09fe99f1.zip gcc-f9d5362918ef7aa6f840ac48ccb8897a09fe99f1.tar.gz gcc-f9d5362918ef7aa6f840ac48ccb8897a09fe99f1.tar.bz2 |
Align with: "OpenMP/Fortran: 'target update' with DT components"
This commit partially undos the OG12 commit
cb934e37962eeccc8641982b9a9855408979c767
OpenMP/Fortran: 'target update' with strides + DT components
to match the mainline (GCC 13) version:
r13-3625-g6629444170f85e9b1e243aa07e3e07a8b9f8fce5
OpenMP/Fortran: 'target update' with DT components
The difference is that strides are not permitted in the mainline
version; for the reason and to-do, see: https://gcc.gnu.org/PR107517
Interdiff changelog:
2022-11-04 Tobias Burnus <tobias@codesourcery.com>
gcc/fortran/ChangeLog.omp
Partial Revert:
2022-11-02 Tobias Burnus <tobias@codesourcery.com>
* openmp.cc (resolve_omp_clauses):Accept noncontiguous arrays.
libgomp/ChangeLog.omp
* testsuite/libgomp.fortran/target-13.f90: Remove strides to match
mainline (GCC 13) version.
(cherry picked from commit 6629444170f85e9b1e243aa07e3e07a8b9f8fce5)
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog.omp | 7 | ||||
-rw-r--r-- | gcc/fortran/openmp.cc | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/gcc/fortran/ChangeLog.omp b/gcc/fortran/ChangeLog.omp index a7ce52c..a7c7a25 100644 --- a/gcc/fortran/ChangeLog.omp +++ b/gcc/fortran/ChangeLog.omp @@ -1,3 +1,10 @@ +2022-11-04 Tobias Burnus <tobias@codesourcery.com> + + Partial Revert: + 2022-11-02 Tobias Burnus <tobias@codesourcery.com> + + * openmp.cc (resolve_omp_clauses):Accept noncontiguous arrays. + 2022-11-02 Tobias Burnus <tobias@codesourcery.com> * trans-openmp.cc (gfc_trans_omp_clauses): Ensure DT struct-comp with diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc index 52ffb2c..7cf0d2e 100644 --- a/gcc/fortran/openmp.cc +++ b/gcc/fortran/openmp.cc @@ -8378,11 +8378,8 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses, Only raise an error here if we're really sure the array isn't contiguous. An expression such as arr(-n:n,-n:n) could be contiguous even if it looks - like it may not be. - And OpenMP's 'target update' permits strides for - the to/from clause. */ + like it may not be. */ if (code->op != EXEC_OACC_UPDATE - && code->op != EXEC_OMP_TARGET_UPDATE && list != OMP_LIST_CACHE && list != OMP_LIST_DEPEND && !gfc_is_simply_contiguous (n->expr, false, true) @@ -8426,9 +8423,7 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses, int i; gfc_array_ref *ar = &lastslice->u.ar; for (i = 0; i < ar->dimen; i++) - if (ar->stride[i] - && code->op != EXEC_OACC_UPDATE - && code->op != EXEC_OMP_TARGET_UPDATE) + if (ar->stride[i] && code->op != EXEC_OACC_UPDATE) { gfc_error ("Stride should not be specified for " "array section in %s clause at %L", |