Update _OPENACC value and documentation for OpenACC 2.5

Thomas Schwinge thomas@codesourcery.com
Mon May 15 11:51:00 GMT 2017


Hi!

Given that on gomp-4_0-branch we're now implementing most of what has
been added/changed in OpenACC 2.5, it seemed to make sense to apply the
following to gomp-4_0-branch in r248057:

commit 72ae911aeab1e0664db5737f339fcd81cceff287
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon May 15 11:45:33 2017 +0000

    Update _OPENACC value and documentation for OpenACC 2.5
    
            gcc/c-family/
            * c-cppbuiltin.c (c_cpp_builtins): Update "_OPENACC" to "201510".
            gcc/fortran/
            * cpp.c (cpp_define_builtins): Update "_OPENACC" to "201510".
            * gfortran.texi: Update for OpenACC 2.5.
            * Intrinsic.texi: Likewise.
            * invoke.texi: Likewise.
            gcc/testsuite/
            * c-c++-common/cpp/openacc-define-3.c: Update.
            * gfortran.dg/openacc-define-3.f90: Likewise.
            gcc/
            * doc/invoke.texi: Update for OpenACC 2.5.
            libgomp/
            * libgomp.texi: Update for OpenACC 2.5.
            * openacc.f90 (openacc_version): Update to "201510".
            * openacc_lib.h (openacc_version): Likewise.
            * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Update.
            * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Update.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@248057 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog.gomp                                  |  4 ++++
 gcc/c-family/ChangeLog.gomp                         |  4 ++++
 gcc/c-family/c-cppbuiltin.c                         |  2 +-
 gcc/doc/invoke.texi                                 |  4 +++-
 gcc/fortran/ChangeLog.gomp                          |  7 +++++++
 gcc/fortran/cpp.c                                   |  2 +-
 gcc/fortran/gfortran.texi                           | 16 +++++-----------
 gcc/fortran/intrinsic.texi                          |  6 +++---
 gcc/fortran/invoke.texi                             |  4 +---
 gcc/testsuite/ChangeLog.gomp                        |  5 +++++
 gcc/testsuite/c-c++-common/cpp/openacc-define-3.c   |  2 +-
 gcc/testsuite/gfortran.dg/openacc-define-3.f90      |  2 +-
 libgomp/ChangeLog.gomp                              |  6 ++++++
 libgomp/libgomp.texi                                | 21 +++++++++++----------
 libgomp/openacc.f90                                 |  2 +-
 libgomp/openacc_lib.h                               |  2 +-
 .../libgomp.oacc-fortran/openacc_version-1.f        |  2 +-
 .../libgomp.oacc-fortran/openacc_version-2.f90      |  2 +-
 18 files changed, 57 insertions(+), 36 deletions(-)

diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp
index a4720c3..d7b50a1 100644
--- gcc/ChangeLog.gomp
+++ gcc/ChangeLog.gomp
@@ -1,3 +1,7 @@
+2017-05-15  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* doc/invoke.texi: Update for OpenACC 2.5.
+
 2017-05-14  Thomas Schwinge  <thomas@codesourcery.com>
 
 	* omp-low.c (execute_oacc_device_lower): Remove the parallelism
diff --git gcc/c-family/ChangeLog.gomp gcc/c-family/ChangeLog.gomp
index f975aef..31b273ae 100644
--- gcc/c-family/ChangeLog.gomp
+++ gcc/c-family/ChangeLog.gomp
@@ -1,3 +1,7 @@
+2017-05-15  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* c-cppbuiltin.c (c_cpp_builtins): Update "_OPENACC" to "201510".
+
 2017-05-04  Cesar Philippidis  <cesar@codesourcery.com>
 
 	* c-pragma.h (enum pragma_omp_clause): Add
diff --git gcc/c-family/c-cppbuiltin.c gcc/c-family/c-cppbuiltin.c
index 3d4587e..40b14ff 100644
--- gcc/c-family/c-cppbuiltin.c
+++ gcc/c-family/c-cppbuiltin.c
@@ -1228,7 +1228,7 @@ c_cpp_builtins (cpp_reader *pfile)
     cpp_define (pfile, "__SSP__=1");
 
   if (flag_openacc)
-    cpp_define (pfile, "_OPENACC=201306");
+    cpp_define (pfile, "_OPENACC=201510");
 
   if (flag_openmp)
     cpp_define (pfile, "_OPENMP=201511");
diff --git gcc/doc/invoke.texi gcc/doc/invoke.texi
index 299dab1..f70dab2 100644
--- gcc/doc/invoke.texi
+++ gcc/doc/invoke.texi
@@ -1961,10 +1961,12 @@ freestanding and hosted environments.
 Enable handling of OpenACC directives @code{#pragma acc} in C/C++ and
 @code{!$acc} in Fortran.  When @option{-fopenacc} is specified, the
 compiler generates accelerated code according to the OpenACC Application
-Programming Interface v2.0 @w{@uref{http://www.openacc.org/}}.  This option
+Programming Interface v2.5 @w{@uref{http://www.openacc.org/}}.  This option
 implies @option{-pthread}, and thus is only supported on targets that
 have support for @option{-pthread}.
 
+See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information.
+
 @item -fopenacc-dim=@var{geom}
 @opindex fopenacc-dim
 @cindex OpenACC accelerator programming
diff --git gcc/fortran/ChangeLog.gomp gcc/fortran/ChangeLog.gomp
index 8a6ae6a..0f71797 100644
--- gcc/fortran/ChangeLog.gomp
+++ gcc/fortran/ChangeLog.gomp
@@ -1,3 +1,10 @@
+2017-05-15  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* cpp.c (cpp_define_builtins): Update "_OPENACC" to "201510".
+	* gfortran.texi: Update for OpenACC 2.5.
+	* Intrinsic.texi: Likewise.
+	* invoke.texi: Likewise.
+
 2017-05-14  Thomas Schwinge  <thomas@codesourcery.com>
 
 	* openmp.c (OACC_KERNELS_CLAUSES)
diff --git gcc/fortran/cpp.c gcc/fortran/cpp.c
index 8ac8092..34f2ded 100644
--- gcc/fortran/cpp.c
+++ gcc/fortran/cpp.c
@@ -165,7 +165,7 @@ cpp_define_builtins (cpp_reader *pfile)
   cpp_define (pfile, "_LANGUAGE_FORTRAN=1");
 
   if (flag_openacc)
-    cpp_define (pfile, "_OPENACC=201306");
+    cpp_define (pfile, "_OPENACC=201510");
 
   if (flag_openmp)
     cpp_define (pfile, "_OPENMP=201307");
diff --git gcc/fortran/gfortran.texi gcc/fortran/gfortran.texi
index 4d288ba..9eada35 100644
--- gcc/fortran/gfortran.texi
+++ gcc/fortran/gfortran.texi
@@ -477,9 +477,7 @@ used on real-world programs.  In particular, the supported extensions
 include OpenMP, Cray-style pointers, some old vendor extensions, and several
 Fortran 2003 and Fortran 2008 features, including TR 15581.  However, it is
 still under development and has a few remaining rough edges.
-There also is initial support for OpenACC.
-Note that this is an experimental feature, incomplete, and subject to
-change in future versions of GCC.  See
+There also is support for OpenACC.  See
 @uref{https://gcc.gnu.org/wiki/OpenACC} for more information.
 
 At present, the GNU Fortran compiler passes the
@@ -537,10 +535,8 @@ and @ref{TS 18508 status} sections of the documentation.
 
 Additionally, the GNU Fortran compilers supports the OpenMP specification
 (version 4.0, @url{http://openmp.org/@/wp/@/openmp-specifications/}).
-There also is initial support for the OpenACC specification (targeting
-version 2.0, @uref{http://www.openacc.org/}).
-Note that this is an experimental feature, incomplete, and subject to
-change in future versions of GCC.  See
+There also is support for the OpenACC specification (targeting
+version 2.5, @uref{http://www.openacc.org/}).  See
 @uref{https://gcc.gnu.org/wiki/OpenACC} for more information.
 
 @node Varying Length Character Strings
@@ -2045,7 +2041,7 @@ influence run-time behavior.
 
 GNU Fortran strives to be compatible to the
 @uref{http://www.openacc.org/, OpenACC Application Programming
-Interface v2.0}.
+Interface v2.5}.
 
 To enable the processing of the OpenACC directive @code{!$acc} in
 free-form source code; the @code{c$acc}, @code{*$acc} and @code{!$acc}
@@ -2061,9 +2057,7 @@ The OpenACC Fortran runtime library routines are provided both in a
 form of a Fortran 90 module named @code{openacc} and in a form of a
 Fortran @code{include} file named @file{openacc_lib.h}.
 
-Note that this is an experimental feature, incomplete, and subject to
-change in future versions of GCC.  See
-@uref{https://gcc.gnu.org/wiki/OpenACC} for more information.
+See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information.
 
 @node Argument list functions
 @subsection Argument list functions @code{%VAL}, @code{%REF} and @code{%LOC}
diff --git gcc/fortran/intrinsic.texi gcc/fortran/intrinsic.texi
index 8840630..0c5ccf6 100644
--- gcc/fortran/intrinsic.texi
+++ gcc/fortran/intrinsic.texi
@@ -14137,7 +14137,7 @@ kind @code{omp_proc_bind_kind}:
 @section OpenACC Module @code{OPENACC}
 @table @asis
 @item @emph{Standard}:
-OpenACC Application Programming Interface v2.0
+OpenACC Application Programming Interface v2.5
 @end table
 
 
@@ -14151,9 +14151,9 @@ are listed below.
 
 For details refer to the actual
 @uref{http://www.openacc.org/,
-OpenACC Application Programming Interface v2.0}.
+OpenACC Application Programming Interface v2.5}.
 
 @code{OPENACC} provides the scalar default-integer
 named constant @code{openacc_version} with a value of the form
 @var{yyyymm}, where @code{yyyy} is the year and @var{mm} the month
-of the OpenACC version; for OpenACC v2.0 the value is @code{201306}.
+of the OpenACC version; for OpenACC v2.5 the value is @code{201510}.
diff --git gcc/fortran/invoke.texi gcc/fortran/invoke.texi
index e8b8409..9493832 100644
--- gcc/fortran/invoke.texi
+++ gcc/fortran/invoke.texi
@@ -332,9 +332,7 @@ compilation sentinels in free form and @code{c$}, @code{*$} and
 @code{!$} sentinels in fixed form, and when linking arranges for the
 OpenACC runtime library to be linked in.
 
-Note that this is an experimental feature, incomplete, and subject to
-change in future versions of GCC.  See
-@w{@uref{https://gcc.gnu.org/wiki/OpenACC}} for more information.
+See @w{@uref{https://gcc.gnu.org/wiki/OpenACC}} for more information.
 
 @item -fopenmp
 @opindex @code{fopenmp}
diff --git gcc/testsuite/ChangeLog.gomp gcc/testsuite/ChangeLog.gomp
index 67f01e8..34f0a06 100644
--- gcc/testsuite/ChangeLog.gomp
+++ gcc/testsuite/ChangeLog.gomp
@@ -1,3 +1,8 @@
+2017-05-15  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* c-c++-common/cpp/openacc-define-3.c: Update.
+	* gfortran.dg/openacc-define-3.f90: Likewise.
+
 2017-05-14  Thomas Schwinge  <thomas@codesourcery.com>
 
 	* c-c++-common/goacc/parallel-dims-1.c: Update.
diff --git gcc/testsuite/c-c++-common/cpp/openacc-define-3.c gcc/testsuite/c-c++-common/cpp/openacc-define-3.c
index ccedcd9..21a735a 100644
--- gcc/testsuite/c-c++-common/cpp/openacc-define-3.c
+++ gcc/testsuite/c-c++-common/cpp/openacc-define-3.c
@@ -6,6 +6,6 @@
 # error _OPENACC not defined
 #endif
 
-#if _OPENACC != 201306
+#if _OPENACC != 201510
 # error _OPENACC defined to wrong value
 #endif
diff --git gcc/testsuite/gfortran.dg/openacc-define-3.f90 gcc/testsuite/gfortran.dg/openacc-define-3.f90
index b6c296e..47cb1b0 100644
--- gcc/testsuite/gfortran.dg/openacc-define-3.f90
+++ gcc/testsuite/gfortran.dg/openacc-define-3.f90
@@ -6,6 +6,6 @@
 # error _OPENACC not defined
 #endif
 
-#if _OPENACC != 201306
+#if _OPENACC != 201510
 # error _OPENACC defined to wrong value
 #endif
diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp
index 23882cf..f36cbfc 100644
--- libgomp/ChangeLog.gomp
+++ libgomp/ChangeLog.gomp
@@ -1,5 +1,11 @@
 2017-05-15  Thomas Schwinge  <thomas@codesourcery.com>
 
+	* libgomp.texi: Update for OpenACC 2.5.
+	* openacc.f90 (openacc_version): Update to "201510".
+	* openacc_lib.h (openacc_version): Likewise.
+	* testsuite/libgomp.oacc-fortran/openacc_version-1.f: Update.
+	* testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Update.
+
 	* oacc-async.c (acc_async_test, acc_async_test_all, acc_wait)
 	(acc_wait_async, acc_wait_all, acc_wait_all_async): Set up
 	profiling.
diff --git libgomp/libgomp.texi libgomp/libgomp.texi
index b3fa139..74b98c7 100644
--- libgomp/libgomp.texi
+++ libgomp/libgomp.texi
@@ -1837,11 +1837,9 @@ good practice then to initialize the runtime with an explicit
 
 A complete description of all OpenACC directives accepted may be found in 
 the @uref{http://www.openacc.org/, OpenACC} Application Programming
-Interface manual, version 2.0.
+Interface manual, version 2.5.
 
-Note that this is an experimental feature and subject to
-change in future versions of GCC.  See
-@uref{https://gcc.gnu.org/wiki/OpenACC} for more information.
+See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information.
 
 
 
@@ -1853,12 +1851,15 @@ change in future versions of GCC.  See
 @chapter OpenACC Runtime Library Routines
 
 The runtime routines described here are defined by section 3 of the OpenACC
-specifications in version 2.0.
+specification in version 2.0.
 They have C linkage, and do not throw exceptions.
 Generally, they are available only for the host, with the exception of
 @code{acc_on_device}, which is available for both the host and the
 acceleration device.
 
+This list has not yet been updated for the OpenACC specification in
+version 2.5.
+
 @menu
 * acc_get_num_devices::         Get number of devices for the given device
                                 type.
@@ -2839,7 +2840,7 @@ A.2.1.4.
 @chapter OpenACC Environment Variables
 
 The variables @env{ACC_DEVICE_TYPE} and @env{ACC_DEVICE_NUM}
-are defined by section 4 of the OpenACC specification in version 2.0.
+are defined by section 4 of the OpenACC specification in version 2.5.
 The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes.
 
 @menu
@@ -2854,7 +2855,7 @@ The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes.
 @section @code{ACC_DEVICE_TYPE}
 @table @asis
 @item @emph{Reference}:
-@uref{http://www.openacc.org/, OpenACC specification v2.0}, section
+@uref{http://www.openacc.org/, OpenACC specification v2.5}, section
 4.1.
 @end table
 
@@ -2864,7 +2865,7 @@ The variable @env{GCC_ACC_NOTIFY} is used for diagnostic purposes.
 @section @code{ACC_DEVICE_NUM}
 @table @asis
 @item @emph{Reference}:
-@uref{http://www.openacc.org/, OpenACC specification v2.0}, section
+@uref{http://www.openacc.org/, OpenACC specification v2.5}, section
 4.2.
 @end table
 
@@ -3080,8 +3081,8 @@ is called prior to a call to @code{cudaCreate()}. If @code{cudaCreate()}
 is called prior to a call to an OpenACC function, then you must call
 @code{acc_set_device_num()}@footnote{More complete information
 about @env{ACC_DEVICE_TYPE} and @env{ACC_DEVICE_NUM} can be found in
-sections 4.1 and 4.2 of the @uref{http://www.openacc.org/, OpenACC}
-Application Programming Interface”, Version 2.0.}
+sections 4.1 and 4.2 of the @uref{http://www.openacc.org/, OpenACC
+Application Programming Interface}, version 2.5.}
 
 
 
diff --git libgomp/openacc.f90 libgomp/openacc.f90
index a14816a..dc7bfec 100644
--- libgomp/openacc.f90
+++ libgomp/openacc.f90
@@ -688,7 +688,7 @@ module openacc
   public :: acc_copyin_async, acc_create_async, acc_copyout_async
   public :: acc_delete_async, acc_update_device_async, acc_update_self_async
 
-  integer, parameter :: openacc_version = 201306
+  integer, parameter :: openacc_version = 201510
 
   interface acc_get_num_devices
     procedure :: acc_get_num_devices_h
diff --git libgomp/openacc_lib.h libgomp/openacc_lib.h
index 5eed9d5..0bc6292 100644
--- libgomp/openacc_lib.h
+++ libgomp/openacc_lib.h
@@ -50,7 +50,7 @@
       integer (acc_handle_kind), parameter :: acc_async_noval = -1
       integer (acc_handle_kind), parameter :: acc_async_sync = -2
 
-      integer, parameter :: openacc_version = 201306
+      integer, parameter :: openacc_version = 201510
 
       interface acc_get_num_devices
         function acc_get_num_devices_h (d)
diff --git libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f
index db3c6b1..28f3346 100644
--- libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f
+++ libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f
@@ -4,6 +4,6 @@
       implicit none
       include "openacc_lib.h"
 
-      if (openacc_version .ne. 201306) call abort;
+      if (openacc_version .ne. 201510) call abort;
 
       end program main
diff --git libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90 libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90
index a14ecdd..1671fe9 100644
--- libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90
+++ libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90
@@ -4,6 +4,6 @@ program main
   use openacc
   implicit none
 
-  if (openacc_version .ne. 201306) call abort;
+  if (openacc_version .ne. 201510) call abort;
 
 end program main


Grüße
 Thomas



More information about the Gcc-patches mailing list