public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>, <fortran@gcc.gnu.org>,
	<gcc-patches@gcc.gnu.org>
Cc: Tobias Burnus <burnus@net-b.de>,
	Cesar Philippidis	<cesar@codesourcery.com>
Subject: Re: Implementing OpenACC's Fortran module
Date: Wed, 24 May 2017 13:48:00 -0000	[thread overview]
Message-ID: <87k256weqh.fsf@hertz.schwinge.homeip.net> (raw)
In-Reply-To: <20170524115832.GG8499@tucnak>

Hi!

On Wed, 24 May 2017 13:58:32 +0200, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, May 24, 2017 at 01:34:50PM +0200, Thomas Schwinge wrote:
> > Thus OK for trunk, as posted?
> 
> Ok.

Thanks.  Committed to trunk in r248412:

commit b70df2112de1c8fb9b448dc24e3a58055e4bbbdc
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed May 24 13:23:55 2017 +0000

    Fortran OpenACC "openacc_lib.h": acc_pcopyin, acc_pcreate
    
            libgomp/
            * openacc_lib.h (acc_pcopyin, acc_pcreate): Route to
            acc_present_or_copyin and acc_present_or_create procedures,
            respectively.
            * testsuite/libgomp.oacc-fortran/lib-32-1.f: Exercise these, and
            generally different variants of OpenACC Runtime Library functions.
            * testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248412 138bc75d-0d04-0410-961f-82ee72b054a4
---
 libgomp/ChangeLog                                 |  7 ++++
 libgomp/openacc_lib.h                             | 42 ++++-------------------
 libgomp/testsuite/libgomp.oacc-fortran/lib-32-1.f | 36 ++++++++-----------
 libgomp/testsuite/libgomp.oacc-fortran/lib-32-2.f | 26 +++++++-------
 4 files changed, 42 insertions(+), 69 deletions(-)

diff --git libgomp/ChangeLog libgomp/ChangeLog
index af8c5ca..55869d2 100644
--- libgomp/ChangeLog
+++ libgomp/ChangeLog
@@ -1,5 +1,12 @@
 2017-05-24  Thomas Schwinge  <thomas@codesourcery.com>
 
+	* openacc_lib.h (acc_pcopyin, acc_pcreate): Route to
+	acc_present_or_copyin and acc_present_or_create procedures,
+	respectively.
+	* testsuite/libgomp.oacc-fortran/lib-32-1.f: Exercise these, and
+	generally different variants of OpenACC Runtime Library functions.
+	* testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
+
 	* testsuite/libgomp.oacc-fortran/lib-32-1.f: New file.
 	* testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
 
diff --git libgomp/openacc_lib.h libgomp/openacc_lib.h
index 65f47a8..7818bd7 100644
--- libgomp/openacc_lib.h
+++ libgomp/openacc_lib.h
@@ -191,23 +191,9 @@
       end interface
 
       interface acc_pcopyin
-        subroutine acc_pcopyin_32_h (a, len)
-          use iso_c_binding, only: c_int32_t
-          !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
-          type (*), dimension (*) :: a
-          integer (c_int32_t) len
-        end subroutine
-
-        subroutine acc_pcopyin_64_h (a, len)
-          use iso_c_binding, only: c_int64_t
-          !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
-          type (*), dimension (*) :: a
-          integer (c_int64_t) len
-        end subroutine
-
-        subroutine acc_pcopyin_array_h (a)
-          type (*), dimension (..), contiguous :: a
-          end subroutine
+        procedure :: acc_present_or_copyin_32_h
+        procedure :: acc_present_or_copyin_64_h
+        procedure :: acc_present_or_copyin_array_h
       end interface
 
       interface acc_create
@@ -251,23 +237,9 @@
       end interface
 
       interface acc_pcreate
-        subroutine acc_pcreate_32_h (a, len)
-          use iso_c_binding, only: c_int32_t
-          !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
-          type (*), dimension (*) :: a
-          integer (c_int32_t) len
-        end subroutine
-
-        subroutine acc_pcreate_64_h (a, len)
-          use iso_c_binding, only: c_int64_t
-          !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
-          type (*), dimension (*) :: a
-          integer (c_int64_t) len
-        end subroutine
-
-        subroutine acc_pcreate_array_h (a)
-          type (*), dimension (..), contiguous :: a
-          end subroutine
+        procedure :: acc_present_or_create_32_h
+        procedure :: acc_present_or_create_64_h
+        procedure :: acc_present_or_create_array_h
       end interface
 
       interface acc_copyout
@@ -353,7 +325,7 @@
       ! acc_map_data: Only available in C/C++
       ! acc_unmap_data: Only available in C/C++
       ! acc_deviceptr: Only available in C/C++
-      ! acc_ostptr: Only available in C/C++
+      ! acc_hostptr: Only available in C/C++
 
       interface acc_is_present
         function acc_is_present_32_h (a, len)
diff --git libgomp/testsuite/libgomp.oacc-fortran/lib-32-1.f libgomp/testsuite/libgomp.oacc-fortran/lib-32-1.f
index 4606d77..177e4fb 100644
--- libgomp/testsuite/libgomp.oacc-fortran/lib-32-1.f
+++ libgomp/testsuite/libgomp.oacc-fortran/lib-32-1.f
@@ -20,8 +20,8 @@
 
       SHARED_MEM = ACC_IS_PRESENT (H)
 
-      CALL ACC_PRESENT_OR_CREATE (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      CALL ACC_PRESENT_OR_CREATE (H, INT (SIZEOF (H), 4))
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -48,8 +48,7 @@
          H(I) = I + 4
       END DO
 
-!      CALL ACC_PCREATE (H)
-      CALL ACC_PRESENT_OR_CREATE (H)
+      CALL ACC_PCREATE (H, INT (SIZEOF (H), 4))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -63,7 +62,7 @@
          H(I) = I + 6
       END DO
 
-      CALL ACC_PRESENT_OR_COPYIN (H)
+      CALL ACC_PRESENT_OR_COPYIN (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -77,8 +76,7 @@
          H(I) = I + 8
       END DO
 
-!      CALL ACC_PCOPYIN (H)
-      CALL ACC_PRESENT_OR_COPYIN (H)
+      CALL ACC_PCOPYIN (H, INT (SIZEOF (H), 4))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -92,18 +90,17 @@
          H(I) = I + 10
       END DO
 
-      CALL ACC_COPYOUT (H)
+      CALL ACC_COPYOUT (H, INT (SIZEOF (H), 4))
       IF (.NOT. SHARED_MEM) THEN
-         IF (ACC_IS_PRESENT (H)) CALL ABORT
+         IF (ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
       ENDIF
 
       DO I = 1, N
          IF (H(I) .NE. I + MERGE (10, 9, SHARED_MEM)) CALL ABORT
       END DO
 
-!      CALL ACC_PCOPYIN (H)
-      CALL ACC_PRESENT_OR_COPYIN (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      CALL ACC_PCOPYIN (H)
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 4))) CALL ABORT
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -117,8 +114,7 @@
          H(I) = I + 12
       END DO
 
-!      CALL ACC_PCOPYIN (H)
-      CALL ACC_PRESENT_OR_COPYIN (H)
+      CALL ACC_PCOPYIN (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -132,8 +128,7 @@
          H(I) = I + 14
       END DO
 
-!      CALL ACC_PCREATE (H)
-      CALL ACC_PRESENT_OR_CREATE (H)
+      CALL ACC_PCREATE (H)
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -147,8 +142,7 @@
          H(I) = I + 16
       END DO
 
-!      CALL ACC_PCREATE (H)
-      CALL ACC_PRESENT_OR_CREATE (H)
+      CALL ACC_PCREATE (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -162,8 +156,8 @@
          H(I) = I + 18
       END DO
 
-      CALL ACC_UPDATE_SELF (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      CALL ACC_UPDATE_SELF (H, INT (SIZEOF (H), 4))
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
 
       DO I = 1, N
          IF (H(I) .NE. I + MERGE (18, 17, SHARED_MEM)) CALL ABORT
@@ -171,7 +165,7 @@
 
       CALL ACC_DELETE (H)
       IF (.NOT. SHARED_MEM) THEN
-         IF (ACC_IS_PRESENT (H)) CALL ABORT
+         IF (ACC_IS_PRESENT (H, INT (SIZEOF (H), 4))) CALL ABORT
       ENDIF
 
       DEALLOCATE (H)
diff --git libgomp/testsuite/libgomp.oacc-fortran/lib-32-2.f libgomp/testsuite/libgomp.oacc-fortran/lib-32-2.f
index 88f5566..a08eb84 100644
--- libgomp/testsuite/libgomp.oacc-fortran/lib-32-2.f
+++ libgomp/testsuite/libgomp.oacc-fortran/lib-32-2.f
@@ -20,8 +20,8 @@
 
       SHARED_MEM = ACC_IS_PRESENT (H)
 
-      CALL ACC_PRESENT_OR_CREATE (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      CALL ACC_PRESENT_OR_CREATE (H, INT (SIZEOF (H), 4))
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -48,7 +48,7 @@
          H(I) = I + 4
       END DO
 
-      CALL ACC_PCREATE (H)
+      CALL ACC_PCREATE (H, INT (SIZEOF (H), 4))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -62,7 +62,7 @@
          H(I) = I + 6
       END DO
 
-      CALL ACC_PRESENT_OR_COPYIN (H)
+      CALL ACC_PRESENT_OR_COPYIN (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -76,7 +76,7 @@
          H(I) = I + 8
       END DO
 
-      CALL ACC_PCOPYIN (H)
+      CALL ACC_PCOPYIN (H, INT (SIZEOF (H), 4))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -90,9 +90,9 @@
          H(I) = I + 10
       END DO
 
-      CALL ACC_COPYOUT (H)
+      CALL ACC_COPYOUT (H, INT (SIZEOF (H), 4))
       IF (.NOT. SHARED_MEM) THEN
-         IF (ACC_IS_PRESENT (H)) CALL ABORT
+         IF (ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
       ENDIF
 
       DO I = 1, N
@@ -100,7 +100,7 @@
       END DO
 
       CALL ACC_PCOPYIN (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 4))) CALL ABORT
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -114,7 +114,7 @@
          H(I) = I + 12
       END DO
 
-      CALL ACC_PCOPYIN (H)
+      CALL ACC_PCOPYIN (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -142,7 +142,7 @@
          H(I) = I + 16
       END DO
 
-      CALL ACC_PCREATE (H)
+      CALL ACC_PCREATE (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -156,8 +156,8 @@
          H(I) = I + 18
       END DO
 
-      CALL ACC_UPDATE_SELF (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      CALL ACC_UPDATE_SELF (H, INT (SIZEOF (H), 4))
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
 
       DO I = 1, N
          IF (H(I) .NE. I + MERGE (18, 17, SHARED_MEM)) CALL ABORT
@@ -165,7 +165,7 @@
 
       CALL ACC_DELETE (H)
       IF (.NOT. SHARED_MEM) THEN
-         IF (ACC_IS_PRESENT (H)) CALL ABORT
+         IF (ACC_IS_PRESENT (H, INT (SIZEOF (H), 4))) CALL ABORT
       ENDIF
 
       DEALLOCATE (H)

Committed to gomp-4_0-branch in r248416:

commit d2fa119480f85d652b76e57947bfc6e38df44b16
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed May 24 13:26:05 2017 +0000

    Fortran OpenACC "openacc_lib.h": acc_pcopyin, acc_pcreate
    
            libgomp/
            * openacc_lib.h (acc_pcopyin, acc_pcreate): Route to
            acc_present_or_copyin and acc_present_or_create procedures,
            respectively.
            * testsuite/libgomp.oacc-fortran/lib-32-1.f: Exercise these, and
            generally different variants of OpenACC Runtime Library functions.
            * testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
    
    trunk r248412
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@248416 138bc75d-0d04-0410-961f-82ee72b054a4
---
 libgomp/ChangeLog.gomp                            |  7 ++++
 libgomp/openacc_lib.h                             | 42 ++++-------------------
 libgomp/testsuite/libgomp.oacc-fortran/lib-32-1.f | 36 ++++++++-----------
 libgomp/testsuite/libgomp.oacc-fortran/lib-32-2.f | 26 +++++++-------
 4 files changed, 42 insertions(+), 69 deletions(-)

diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp
index de4eeb4..bbd7ec6 100644
--- libgomp/ChangeLog.gomp
+++ libgomp/ChangeLog.gomp
@@ -1,5 +1,12 @@
 2017-05-24  Thomas Schwinge  <thomas@codesourcery.com>
 
+	* openacc_lib.h (acc_pcopyin, acc_pcreate): Route to
+	acc_present_or_copyin and acc_present_or_create procedures,
+	respectively.
+	* testsuite/libgomp.oacc-fortran/lib-32-1.f: Exercise these, and
+	generally different variants of OpenACC Runtime Library functions.
+	* testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
+
 	* testsuite/libgomp.oacc-fortran/lib-32-1.f: New file.
 	* testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
 
diff --git libgomp/openacc_lib.h libgomp/openacc_lib.h
index 7c7c070..62fbb23 100644
--- libgomp/openacc_lib.h
+++ libgomp/openacc_lib.h
@@ -204,23 +204,9 @@
       end interface
 
       interface acc_pcopyin
-        subroutine acc_pcopyin_32_h (a, len)
-          use iso_c_binding, only: c_int32_t
-          !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
-          type (*), dimension (*) :: a
-          integer (c_int32_t) len
-        end subroutine
-
-        subroutine acc_pcopyin_64_h (a, len)
-          use iso_c_binding, only: c_int64_t
-          !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
-          type (*), dimension (*) :: a
-          integer (c_int64_t) len
-        end subroutine
-
-        subroutine acc_pcopyin_array_h (a)
-          type (*), dimension (..), contiguous :: a
-          end subroutine
+        procedure :: acc_present_or_copyin_32_h
+        procedure :: acc_present_or_copyin_64_h
+        procedure :: acc_present_or_copyin_array_h
       end interface
 
       interface acc_create
@@ -264,23 +250,9 @@
       end interface
 
       interface acc_pcreate
-        subroutine acc_pcreate_32_h (a, len)
-          use iso_c_binding, only: c_int32_t
-          !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
-          type (*), dimension (*) :: a
-          integer (c_int32_t) len
-        end subroutine
-
-        subroutine acc_pcreate_64_h (a, len)
-          use iso_c_binding, only: c_int64_t
-          !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
-          type (*), dimension (*) :: a
-          integer (c_int64_t) len
-        end subroutine
-
-        subroutine acc_pcreate_array_h (a)
-          type (*), dimension (..), contiguous :: a
-          end subroutine
+        procedure :: acc_present_or_create_32_h
+        procedure :: acc_present_or_create_64_h
+        procedure :: acc_present_or_create_array_h
       end interface
 
       interface acc_copyout
@@ -406,7 +378,7 @@
       ! acc_map_data: Only available in C/C++
       ! acc_unmap_data: Only available in C/C++
       ! acc_deviceptr: Only available in C/C++
-      ! acc_ostptr: Only available in C/C++
+      ! acc_hostptr: Only available in C/C++
 
       interface acc_is_present
         function acc_is_present_32_h (a, len)
diff --git libgomp/testsuite/libgomp.oacc-fortran/lib-32-1.f libgomp/testsuite/libgomp.oacc-fortran/lib-32-1.f
index 4ed866b..0dc7e1b 100644
--- libgomp/testsuite/libgomp.oacc-fortran/lib-32-1.f
+++ libgomp/testsuite/libgomp.oacc-fortran/lib-32-1.f
@@ -20,8 +20,8 @@
 
       SHARED_MEM = ACC_IS_PRESENT (H)
 
-      CALL ACC_PRESENT_OR_CREATE (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      CALL ACC_PRESENT_OR_CREATE (H, INT (SIZEOF (H), 4))
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -48,8 +48,7 @@
          H(I) = I + 4
       END DO
 
-!      CALL ACC_PCREATE (H)
-      CALL ACC_PRESENT_OR_CREATE (H)
+      CALL ACC_PCREATE (H, INT (SIZEOF (H), 4))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -63,7 +62,7 @@
          H(I) = I + 6
       END DO
 
-      CALL ACC_PRESENT_OR_COPYIN (H)
+      CALL ACC_PRESENT_OR_COPYIN (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -77,8 +76,7 @@
          H(I) = I + 8
       END DO
 
-!      CALL ACC_PCOPYIN (H)
-      CALL ACC_PRESENT_OR_COPYIN (H)
+      CALL ACC_PCOPYIN (H, INT (SIZEOF (H), 4))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -92,18 +90,17 @@
          H(I) = I + 10
       END DO
 
-      CALL ACC_COPYOUT_FINALIZE (H)
+      CALL ACC_COPYOUT_FINALIZE (H, INT (SIZEOF (H), 4))
       IF (.NOT. SHARED_MEM) THEN
-         IF (ACC_IS_PRESENT (H)) CALL ABORT
+         IF (ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
       ENDIF
 
       DO I = 1, N
          IF (H(I) .NE. I + MERGE (10, 9, SHARED_MEM)) CALL ABORT
       END DO
 
-!      CALL ACC_PCOPYIN (H)
-      CALL ACC_PRESENT_OR_COPYIN (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      CALL ACC_PCOPYIN (H)
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 4))) CALL ABORT
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -117,8 +114,7 @@
          H(I) = I + 12
       END DO
 
-!      CALL ACC_PCOPYIN (H)
-      CALL ACC_PRESENT_OR_COPYIN (H)
+      CALL ACC_PCOPYIN (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -132,8 +128,7 @@
          H(I) = I + 14
       END DO
 
-!      CALL ACC_PCREATE (H)
-      CALL ACC_PRESENT_OR_CREATE (H)
+      CALL ACC_PCREATE (H)
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -147,8 +142,7 @@
          H(I) = I + 16
       END DO
 
-!      CALL ACC_PCREATE (H)
-      CALL ACC_PRESENT_OR_CREATE (H)
+      CALL ACC_PCREATE (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -162,8 +156,8 @@
          H(I) = I + 18
       END DO
 
-      CALL ACC_UPDATE_SELF (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      CALL ACC_UPDATE_SELF (H, INT (SIZEOF (H), 4))
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
 
       DO I = 1, N
          IF (H(I) .NE. I + MERGE (18, 17, SHARED_MEM)) CALL ABORT
@@ -171,7 +165,7 @@
 
       CALL ACC_DELETE_FINALIZE (H)
       IF (.NOT. SHARED_MEM) THEN
-         IF (ACC_IS_PRESENT (H)) CALL ABORT
+         IF (ACC_IS_PRESENT (H, INT (SIZEOF (H), 4))) CALL ABORT
       ENDIF
 
       DEALLOCATE (H)
diff --git libgomp/testsuite/libgomp.oacc-fortran/lib-32-2.f libgomp/testsuite/libgomp.oacc-fortran/lib-32-2.f
index 3e88ce2..39315d2 100644
--- libgomp/testsuite/libgomp.oacc-fortran/lib-32-2.f
+++ libgomp/testsuite/libgomp.oacc-fortran/lib-32-2.f
@@ -20,8 +20,8 @@
 
       SHARED_MEM = ACC_IS_PRESENT (H)
 
-      CALL ACC_PRESENT_OR_CREATE (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      CALL ACC_PRESENT_OR_CREATE (H, INT (SIZEOF (H), 4))
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -48,7 +48,7 @@
          H(I) = I + 4
       END DO
 
-      CALL ACC_PCREATE (H)
+      CALL ACC_PCREATE (H, INT (SIZEOF (H), 4))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -62,7 +62,7 @@
          H(I) = I + 6
       END DO
 
-      CALL ACC_PRESENT_OR_COPYIN (H)
+      CALL ACC_PRESENT_OR_COPYIN (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -76,7 +76,7 @@
          H(I) = I + 8
       END DO
 
-      CALL ACC_PCOPYIN (H)
+      CALL ACC_PCOPYIN (H, INT (SIZEOF (H), 4))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -90,9 +90,9 @@
          H(I) = I + 10
       END DO
 
-      CALL ACC_COPYOUT_FINALIZE (H)
+      CALL ACC_COPYOUT_FINALIZE (H, INT (SIZEOF (H), 4))
       IF (.NOT. SHARED_MEM) THEN
-         IF (ACC_IS_PRESENT (H)) CALL ABORT
+         IF (ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
       ENDIF
 
       DO I = 1, N
@@ -100,7 +100,7 @@
       END DO
 
       CALL ACC_PCOPYIN (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 4))) CALL ABORT
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -114,7 +114,7 @@
          H(I) = I + 12
       END DO
 
-      CALL ACC_PCOPYIN (H)
+      CALL ACC_PCOPYIN (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -142,7 +142,7 @@
          H(I) = I + 16
       END DO
 
-      CALL ACC_PCREATE (H)
+      CALL ACC_PCREATE (H, INT (SIZEOF (H), 8))
 
 !$ACC PARALLEL LOOP DEFAULT (PRESENT)
       DO I = 1, N
@@ -156,8 +156,8 @@
          H(I) = I + 18
       END DO
 
-      CALL ACC_UPDATE_SELF (H)
-      IF (.NOT. ACC_IS_PRESENT (H)) CALL ABORT
+      CALL ACC_UPDATE_SELF (H, INT (SIZEOF (H), 4))
+      IF (.NOT. ACC_IS_PRESENT (H, INT (SIZEOF (H), 8))) CALL ABORT
 
       DO I = 1, N
          IF (H(I) .NE. I + MERGE (18, 17, SHARED_MEM)) CALL ABORT
@@ -165,7 +165,7 @@
 
       CALL ACC_DELETE_FINALIZE (H)
       IF (.NOT. SHARED_MEM) THEN
-         IF (ACC_IS_PRESENT (H)) CALL ABORT
+         IF (ACC_IS_PRESENT (H, INT (SIZEOF (H), 4))) CALL ABORT
       ENDIF
 
       DEALLOCATE (H)


Grüße
 Thomas

      reply	other threads:[~2017-05-24 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140818093652.GA12023@physik.fu-berlin.de>
     [not found] ` <53F1F025.8080102@codesourcery.com>
     [not found]   ` <20140818135104.GA8943@physik.fu-berlin.de>
     [not found]     ` <53F29628.401@codesourcery.com>
     [not found]       ` <53F3A8FC.9030105@net-b.de>
     [not found]         ` <53F3B4DB.90506@codesourcery.com>
     [not found]           ` <87siiwyznl.fsf@schwinge.name>
     [not found]             ` <87zifk2oda.fsf@hertz.schwinge.homeip.net>
2017-05-22 15:38               ` Thomas Schwinge
2017-05-23 11:17                 ` Jakub Jelinek
2017-05-24 11:38                   ` Thomas Schwinge
2017-05-24 12:00                     ` Jakub Jelinek
2017-05-24 13:48                       ` Thomas Schwinge [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k256weqh.fsf@hertz.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=burnus@net-b.de \
    --cc=cesar@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).