From patchwork Wed Feb 10 03:14:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1438793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Db4cv4ptFz9sB4 for ; Wed, 10 Feb 2021 14:14:55 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8CA8E398B89B; Wed, 10 Feb 2021 03:14:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id C227C3858D29; Wed, 10 Feb 2021 03:14:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C227C3858D29 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Julian_Brown@mentor.com IronPort-SDR: SM184tcaE2VOwr5fKF2xesDjZLO76tJHc/qbCaX0o7z2RHHMu/7bl/mtmMXJPKJ4Dl1Qf8ZLAI 9rot9V8CRYc7By5EsY1QlYTrGoKcTzbW07bTLR/fakh3SOw+tlwu/OIN49Mz90Civ2ydWDog9Z idsrCkJ6bajMQlzjzmWdWcApXR5JeDFM8Pb5SyPjL4Y5BnUVYWVvmwhfi7E+bpmMvTFZRXTO6t qTeaI/YkMA6AMESRYE8+n3R9fIk37U0/WPVGy87aOHbn/KTQ5hLOw7qhS0lJp8UhbqkvqqtgFB FvY= X-IronPort-AV: E=Sophos;i="5.81,166,1610438400"; d="scan'208";a="60253582" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 09 Feb 2021 19:14:37 -0800 IronPort-SDR: w4SsikbB5bVOdDWck8xytujrWQjNNd0OPZoUpo/5YAXCdg14Dmes3uWwgCkkh/fQVU0t8ihmSx IYw7k54edXRbLCFzf6bBDl8buI9zxJmxCyw/SZfgEcuJ1Fg+iaWbwonLojG+0yj/PMRdSh9mOg z/3qSXakmZyOhR9B5FrDUqoTGquMDKzekRot06cVtP2B5OIH+f6ztOkUanO7eFELIDgUuA8g1m g7MpWqtOn+O9Cp3Tis+CP1Qy9ELgwdEwSEntcx7V4SmCM3iNJEUNZqn4LqoaBd3xIzXYOP7sg7 oZ4= From: Julian Brown To: Subject: [PATCH 1/2] Revert "openacc: Allow strided arrays in update directives" Date: Tue, 9 Feb 2021 19:14:06 -0800 Message-ID: <20210210031407.57504-2-julian@codesourcery.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210210031407.57504-1-julian@codesourcery.com> References: <20210210031407.57504-1-julian@codesourcery.com> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jakub Jelinek , Tobias Burnus , Thomas Schwinge , fortran@gcc.gnu.org Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" 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", From patchwork Wed Feb 10 03:14:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1438794 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Db4d235mJz9sB4 for ; Wed, 10 Feb 2021 14:15:02 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B2FC398B896; Wed, 10 Feb 2021 03:14:46 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 5E1FF3857C63; Wed, 10 Feb 2021 03:14:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5E1FF3857C63 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Julian_Brown@mentor.com IronPort-SDR: BXCbk9UHXJi0Feyiu67P5YIjYHQWr7Tj70Hr9mHog2ySqFY7+99RxlBAfPgiMZrNoItJE+xALf 5kReABOgGq4qygvUAZpYqfPKtyX/kURlyYGP/AoqZXF5xr09N7VKakexGqJRRduQjc27jEbeTs HUtRGlwsqS6i4WqCnXVWdXGDc41auHcC4iqDfHEEORDhkGoOKKdK/bLpzmiZhe8VdbsTER//Nl 3X/h9LTOy+3Tae6x1kygTFaSDZ40kie4Ng6myW3ZDGMG80Z7NmFPNifdQXG06w2dIv3baUpnLV BNg= X-IronPort-AV: E=Sophos;i="5.81,166,1610438400"; d="scan'208";a="60253585" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 09 Feb 2021 19:14:41 -0800 IronPort-SDR: JwbVP2lfQkermPljYs52tViB5uOJkiIFWdr4vzv+tRUuw6CVhjfr/QKP2lg3D+DubhD7uzMV6Z aViOgRjLdW9nBJ+H3J3QB34XxojO09cLQhba7JNk1a/M8aQdsmOGiTWJCFRQ7U0qui1bkIAqlr PvXBWE/iXBWq19BcLbuQ9cQ3Ch46LmVTJsrYxq1MjEY894KK0yHDea6aTZbamQnvaoZfu9dS/G YKeg2S20bs4dFdJF2WDCRSo1S7AzBherf5/oY5mJFxXLgWyGTcAbZbs1W8o9/0+GQQz5ozg/Oo kJk= From: Julian Brown To: Subject: [PATCH 2/2] openacc: Add XFAILs [PR98979] Date: Tue, 9 Feb 2021 19:14:07 -0800 Message-ID: <20210210031407.57504-3-julian@codesourcery.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210210031407.57504-1-julian@codesourcery.com> References: <20210210031407.57504-1-julian@codesourcery.com> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jakub Jelinek , Tobias Burnus , Thomas Schwinge , fortran@gcc.gnu.org Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" 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)