* [PATCH 0/2] openacc: Fix/temp workaround for PR98979
@ 2021-02-10 3:14 Julian Brown
2021-02-10 3:14 ` [PATCH 1/2] Revert "openacc: Allow strided arrays in update directives" Julian Brown
2021-02-10 3:14 ` [PATCH 2/2] openacc: Add XFAILs [PR98979] Julian Brown
0 siblings, 2 replies; 3+ messages in thread
From: Julian Brown @ 2021-02-10 3:14 UTC (permalink / raw)
To: gcc-patches; +Cc: fortran, Tobias Burnus, Thomas Schwinge, Jakub Jelinek
Hi,
Until a patch to fix derived type mappings with array elements, etc. is
approved, this small patch series (a) reverts the strided arrays in
update directives patch, and (b) adds some XFAILS/skips for the failing
tests flagged in PR98979.
I will apply shortly as obvious.
Thanks,
Julian
Julian Brown (2):
Revert "openacc: Allow strided arrays in update directives"
openacc: Add XFAILs [PR98979]
gcc/fortran/openmp.c | 5 ++---
gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90 | 5 +++--
gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f90 | 3 +++
gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f90 | 3 +++
libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90 | 5 +++--
5 files changed, 14 insertions(+), 7 deletions(-)
--
2.29.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] Revert "openacc: Allow strided arrays in update directives"
2021-02-10 3:14 [PATCH 0/2] openacc: Fix/temp workaround for PR98979 Julian Brown
@ 2021-02-10 3:14 ` Julian Brown
2021-02-10 3:14 ` [PATCH 2/2] openacc: Add XFAILs [PR98979] Julian Brown
1 sibling, 0 replies; 3+ messages in thread
From: Julian Brown @ 2021-02-10 3:14 UTC (permalink / raw)
To: gcc-patches; +Cc: fortran, Tobias Burnus, Thomas Schwinge, Jakub Jelinek
This patch reverts the non-testsuite parts of commit
9a4d32f85ccebc0ee4b24e6d9d7a4f11c04d7146 which cause ICEs without the
yet-to-be-approved patch here:
https://gcc.gnu.org/pipermail/gcc-patches/2021-February/564711.html
gcc/fortran/
PR fortran/98979
* openmp.c (resolve_omp_clauses): Omit OpenACC update in
contiguity check and stride-specified error.
---
gcc/fortran/openmp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 797f6c86b62..aab17f0589f 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -5192,8 +5192,7 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
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. */
- if (code->op != EXEC_OACC_UPDATE
- && list != OMP_LIST_CACHE
+ if (list != OMP_LIST_CACHE
&& list != OMP_LIST_DEPEND
&& !gfc_is_simply_contiguous (n->expr, false, true)
&& gfc_is_not_contiguous (n->expr))
@@ -5231,7 +5230,7 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
int i;
gfc_array_ref *ar = &array_ref->u.ar;
for (i = 0; i < ar->dimen; i++)
- if (ar->stride[i] && code->op != EXEC_OACC_UPDATE)
+ if (ar->stride[i])
{
gfc_error ("Stride should not be specified for "
"array section in %s clause at %L",
--
2.29.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] openacc: Add XFAILs [PR98979]
2021-02-10 3:14 [PATCH 0/2] openacc: Fix/temp workaround for PR98979 Julian Brown
2021-02-10 3:14 ` [PATCH 1/2] Revert "openacc: Allow strided arrays in update directives" Julian Brown
@ 2021-02-10 3:14 ` Julian Brown
1 sibling, 0 replies; 3+ messages in thread
From: Julian Brown @ 2021-02-10 3:14 UTC (permalink / raw)
To: gcc-patches; +Cc: fortran, Tobias Burnus, Thomas Schwinge, Jakub Jelinek
This patch adds some XFAILs for PR98979 until the patch to fix them has
been approved. See:
https://gcc.gnu.org/pipermail/gcc-patches/2021-February/564711.html
gcc/testsuite/
PR fortran/98979
* gfortran.dg/goacc/array-with-dt-2.f90: Add expected errors.
* gfortran.dg/goacc/derived-chartypes-1.f90: Skip ICEing test.
* gfortran.dg/goacc/derived-chartypes-2.f90: Likewise.
libgomp/
PR fortran/98979
* testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90: Add expected
errors.
---
gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90 | 5 +++--
gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f90 | 3 +++
gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f90 | 3 +++
libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90 | 5 +++--
4 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90 b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90
index 807580d75a9..e4a6f319772 100644
--- a/gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/array-with-dt-2.f90
@@ -4,7 +4,8 @@ end type t
type(t), allocatable :: b(:)
-!$acc update host(b(::2))
-!$acc update host(b(1)%A(::3,::4))
+! TODO: Remove expected errors when this is supported.
+!$acc update host(b(::2)) ! { dg-error "Stride should not be specified for array section in MAP clause" }
+!$acc update host(b(1)%A(::3,::4)) ! { dg-error "Stride should not be specified for array section in MAP clause" }
end
diff --git a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f90 b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f90
index e4d360e1262..f7aafbfc036 100644
--- a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-1.f90
@@ -1,3 +1,6 @@
+! This currently ICEs. Avoid that.
+! { dg-skip-if "PR98979" { *-*-* } }
+
type :: type1
character(len=35) :: a
end type type1
diff --git a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f90 b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f90
index cca6443e7fc..e22fc679df2 100644
--- a/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/derived-chartypes-2.f90
@@ -1,3 +1,6 @@
+! This currently ICEs. Avoid that.
+! { dg-skip-if "PR98979" { *-*-* } }
+
type :: type1
character(len=35,kind=4) :: a
end type type1
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90 b/libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90
index f04d76d583a..61250708197 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/array-stride-dt-1.f90
@@ -24,8 +24,9 @@ end do
b(1)%A(:,:) = 5
-!$acc update device(b(::2))
-!$acc update device(b(1)%A(::3,::4))
+! TODO: Remove expected errors once this is supported.
+!$acc update device(b(::2)) ! { dg-error "Stride should not be specified for array section in MAP clause" }
+!$acc update device(b(1)%A(::3,::4)) ! { dg-error "Stride should not be specified for array section in MAP clause" }
do i=1,20
!$acc exit data copyout(b(i)%A)
--
2.29.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-10 3:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 3:14 [PATCH 0/2] openacc: Fix/temp workaround for PR98979 Julian Brown
2021-02-10 3:14 ` [PATCH 1/2] Revert "openacc: Allow strided arrays in update directives" Julian Brown
2021-02-10 3:14 ` [PATCH 2/2] openacc: Add XFAILs [PR98979] Julian Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).