From patchwork Sat Jan 4 02:25:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1217475 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=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-516641-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="iRh0A1qF"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47qQcQ19CVz9s4Y for ; Sat, 4 Jan 2020 13:25:55 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; q=dns; s=default; b=Wt5 TH9Bc5CemGQE2Zu73LvLkPY+rHMbbZOeW5VSEmH8wuIraIGkbUkqzGvgFaYQBDVZ T1SmvaPC66ud+LCje2CJtqQYvR4blpDXZszMRXiBCWs0nTdxjJ9qj4wW/1LiP5Gx 6Al6a/KteqDYIcWW0hsO0uwwimnHLP4bJGwvTDMk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=default; bh=8xShmw59G R0irWeA20eY4YXqVYw=; b=iRh0A1qF/g10BKpIZPV3V55GtJv/XUGTC0I1Xiftg dw2nUR3swGR4AM06tC7DGVyO2sJ3/nSrYc5a9sI2UM50+0bHIXsHA7S2fWEFKiQ3 yLwBAxwuoT/qGAE1g326yqcijkh2gct+4rOYmNRHVpygCVceWTflgXgTmApjSHL/ B4= Received: (qmail 71981 invoked by alias); 4 Jan 2020 02:25:44 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 71964 invoked by uid 89); 4 Jan 2020 02:25:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_PASS autolearn=ham version=3.3.1 spammy=goacc, HContent-Transfer-Encoding:8bit X-HELO: esa3.mentor.iphmx.com Received: from esa3.mentor.iphmx.com (HELO esa3.mentor.iphmx.com) (68.232.137.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 04 Jan 2020 02:25:43 +0000 IronPort-SDR: FUddxJr+SxmZE4bLeGFUpYuU0RsUL9y+3Vl5Uku4nWSPguu4RwAW3fm9K/F5hGP3PnhXS3ow1+ 1oUrebr4Eik4tdnS+jZZeOkXNd0nq09GpsVQylrtX5KR5hq2kqR/XOLlSXJ/2p2M1uijgPRZUJ MDySMqKftyiwQKuWUbIDoVsLPpx7w/EfFqqGkf6SeRdIkHWdM2fWnfM6/Vn4zvrpTrZ9hAAsqT /NC8JLvRgw6u6sRIRug58yRixg0ah4lUxegtBXqVREVaUYdcks8aUcJDef7cGt2XoWELDHV5ay 7c8= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 03 Jan 2020 18:25:41 -0800 IronPort-SDR: MaFyn8tokrqVB+87oxtDrWJHWPwKf4iT/35JC/YpwQZQM8Q8Pp0onRoPz+F9+GUuduIdBMjWG1 hDhdCja+B88uiwW728aAEQ/Dsbj0arJxKjSCQeLlimbGac00K2gezPEbT7sOSYx7hCsR2GvhLr Ld0E6ApKTjR8955PEks7U0rVHBL9VYrtk/r6BNOiaYMBJpw5ukykDBVeOEKH3khP+fdp0Dy6UN 7fUZ5mnuBpYkrc1QVgXEgsKofS34tnYJBpDnWh4QIorTvpnsNMOgK3sxJ61ns9fUOyIhyDGSk+ CFE= From: Julian Brown To: CC: , , Thomas Schwinge , Jakub Jelinek Subject: [PATCH 1/3] Add OpenACC test for sub-references being pointer or allocatable variables Date: Fri, 3 Jan 2020 18:25:12 -0800 Message-ID: <20200104022514.115942-1-julian@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes Hi, This test (by Tobias Burnus, mildly edited) adds a test to check whether the final component of a derived-type access has pointer or allocatable type for manual deep copy attach/detach operations. This is just checking existing behaviour. This arose from discussion of the manual deep copy patch here: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg01439.html OK? Thanks, Julian ChangeLog 2020-01-04 Tobias Burnus gcc/testsuite/ * gfortran.dg/goacc/strided-alloc-ptr.f90: New test. --- .../gfortran.dg/goacc/strided-alloc-ptr.f90 | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/goacc/strided-alloc-ptr.f90 diff --git a/gcc/testsuite/gfortran.dg/goacc/strided-alloc-ptr.f90 b/gcc/testsuite/gfortran.dg/goacc/strided-alloc-ptr.f90 new file mode 100644 index 00000000000..755fd1c164b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/goacc/strided-alloc-ptr.f90 @@ -0,0 +1,34 @@ +implicit none +type t + integer, allocatable :: i, j(:) + integer, pointer :: k, ll(:) +end type t +type(t) :: x(2) + +!$acc enter data copyin(x) + +!$acc enter data copyin(x(:)%i) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the ALLOCATABLE attribute" "" { target "*-*-*" } 10 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 10 } + +!$acc enter data copyin(x(:)%j(3)) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the ALLOCATABLE attribute" "" { target "*-*-*" } 14 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 14 } + +!$acc enter data copyin(x(:)%j) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the ALLOCATABLE attribute" "" { target "*-*-*" } 18 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 18 } + + +!$acc enter data copyin(x(:)%k) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the POINTER attribute" "" { target "*-*-*" } 23 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 23 } + +!$acc enter data copyin(x(:)%ll(3)) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the POINTER attribute" "" { target "*-*-*" } 27 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 27 } + +!$acc enter data copyin(x(:)%ll) +! { dg-error "Component to the right of a part reference with nonzero rank must not have the POINTER attribute" "" { target "*-*-*" } 31 } +! { dg-error ".x. in MAP clause at .1. is not a proper array section" "" { target "*-*-*" } 31 } +end