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)
+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
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)
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",
+2022-11-04 Tobias Burnus <tobias@codesourcery.com>
+
+ * testsuite/libgomp.fortran/target-13.f90: Remove strides to match
+ mainline (GCC 13) version.
+
2022-11-02 Thomas Schwinge <thomas@codesourcery.com>
* testsuite/libgomp.oacc-fortran/declare-allocatable-array_descriptor-1-directive.f90:
! ---------------
-!$omp target update from(var1%at(::2))
+!$omp target update from(var1%at(2:3))
if (var1a /= var1) error stop
if (any (var2a /= var2)) error stop
var1a%at(3)%s = var1a%at(3)%s * (-3)
block
- integer, volatile :: i1,i2,i3,i4,i5,i6
+ integer, volatile :: i1,i2,i3,i4
i1 = 1
i2 = 2
i3 = 1
- i4 = 1
- i5 = 2
- i6 = 1
- !$omp target update from(var3(i1:i2:i3)) from(var1%at(i4:i5:i6))
+ i4 = 2
+ !$omp target update from(var3(i1:i2)) from(var1%at(i3:i4))
i1 = 3
i2 = 3
i3 = 1
i4 = 5
- i5 = 1
- !$omp target update from(var1%at(i1)%s) from(var1%at(i1)%a(i3:i4:i5))
+ !$omp target update from(var1%at(i1)%s) from(var1%at(i2)%a(i3:i4))
end block
if (var1 /= var1) error stop