[gcc/devel/omp/gcc-16] OpenACC 2.7: update references to supported version to 2.7/201811.

Sandra Loosemore via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:1a7f797b8985aaa467f93d1d930d584503f57ad7

commit 1a7f797b8985aaa467f93d1d930d584503f57ad7
Author: Chung-Lin Tang <[email protected]>
Date:   Tue Jul 7 18:56:09 2026 +0000

    OpenACC 2.7: update references to supported version to 2.7/201811.
    
    2025-04-11  Chung-Lin Tang  <[email protected]>
    
    gcc/c-family/ChangeLog:
    
            * c-cppbuiltin.cc (c_cpp_builtins): Updated _OPENACC to "201811"
            for OpenACC 2.7.
    
    gcc/ChangeLog
            * doc/extend.texi:  Adjust version references to 2.7 from 2.6.
    
    gcc/fortran/ChangeLog:
    
            * cpp.cc (cpp_define_builtins): Updated _OPENACC to "201811"
            for OpenACC 2.7.
            * intrinsic.texi (OpenACC Module OPENACC): Adjust version
            references to 2.7 from 2.6.
    
    gcc/testsuite/ChangeLog:
    
            * c-c++-common/cpp/openacc-define-3.c: Adjust test.
            * gfortran.dg/openacc-define-3.f90: Adjust test.
    
    libgomp/ChangeLog:
    
            * acc_prof.h (_ACC_PROF_INFO_VERSION): Adjust to 201811.
            * libgomp.texi (Enabling OpenACC): Adjust version
            references to 2.7 from 2.6.
            * openacc.f90 (module openacc): Adjust openacc_version to 201811.
            * openacc_lib.h (openacc_version): Adjust openacc_version to 201811.
            * testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c:
            Adjust test value to 201811.
            * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Adjust
            test value to 201811.
            * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise.
    
    Co-Authored-By: Sandra Loosemore <[email protected]>

Diff:
---
 gcc/c-family/c-cppbuiltin.cc                                     | 2 +-
 gcc/doc/extend.texi                                              | 2 +-
 gcc/fortran/cpp.cc                                               | 2 +-
 gcc/fortran/intrinsic.texi                                       | 6 +++---
 gcc/testsuite/c-c++-common/cpp/openacc-define-3.c                | 2 +-
 gcc/testsuite/gfortran.dg/openacc-define-3.f90                   | 2 +-
 libgomp/acc_prof.h                                               | 6 ++++--
 libgomp/libgomp.texi                                             | 8 ++++----
 libgomp/openacc.f90                                              | 2 +-
 libgomp/openacc_lib.h                                            | 2 +-
 libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c | 2 +-
 libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f       | 2 +-
 libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90     | 2 +-
 13 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
index 74cbeecb165e..edcd8c642c9d 100644
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -1686,7 +1686,7 @@ c_cpp_builtins (cpp_reader *pfile)
     cpp_define (pfile, "__SSP__=1");
 
   if (flag_openacc)
-    cpp_define (pfile, "_OPENACC=201711");
+    cpp_define (pfile, "_OPENACC=201811");
 
   if (flag_openmp)
     cpp_define (pfile, "_OPENMP=202111");
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 6a3c4fe88006..f42f4adb6d58 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -11080,7 +11080,7 @@ influence run-time behavior.
 
 GCC strives to be compatible with the
 @uref{https://www.openacc.org/, OpenACC Application Programming
-Interface v2.6}.
+Interface v2.7}.
 
 To enable the processing of OpenACC directives @samp{#pragma acc}
 in C and C++, GCC needs to be invoked with the @option{-fopenacc} option.
diff --git a/gcc/fortran/cpp.cc b/gcc/fortran/cpp.cc
index 6b5f136e4f3d..ba5c0f7d07bd 100644
--- a/gcc/fortran/cpp.cc
+++ b/gcc/fortran/cpp.cc
@@ -172,7 +172,7 @@ cpp_define_builtins (cpp_reader *pfile)
   cpp_define (pfile, "_LANGUAGE_FORTRAN=1");
 
   if (flag_openacc)
-    cpp_define (pfile, "_OPENACC=201711");
+    cpp_define (pfile, "_OPENACC=201811");
 
   if (flag_openmp)
     cpp_define (pfile, "_OPENMP=202111");
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 64309fd852ca..e29f8dc131ef 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -16580,7 +16580,7 @@ The following scalar integer named constants are of the kind
 @section OpenACC Module @code{OPENACC}
 @table @asis
 @item @emph{Standard}:
-OpenACC Application Programming Interface v2.6
+OpenACC Application Programming Interface v2.7
 @end table
 
 
@@ -16594,9 +16594,9 @@ are listed below.
 
 For details refer to the actual
 @uref{https://www.openacc.org/,
-OpenACC Application Programming Interface v2.6}.
+OpenACC Application Programming Interface v2.7}.
 
 @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.6 the value is @code{201711}.
+of the OpenACC version; for OpenACC v2.7 the value is @code{201811}.
diff --git a/gcc/testsuite/c-c++-common/cpp/openacc-define-3.c b/gcc/testsuite/c-c++-common/cpp/openacc-define-3.c
index f2122f57dd9d..51f0c6902a7c 100644
--- a/gcc/testsuite/c-c++-common/cpp/openacc-define-3.c
+++ b/gcc/testsuite/c-c++-common/cpp/openacc-define-3.c
@@ -6,6 +6,6 @@
 # error _OPENACC not defined
 #endif
 
-#if _OPENACC != 201711
+#if _OPENACC != 201811
 # error _OPENACC defined to wrong value
 #endif
diff --git a/gcc/testsuite/gfortran.dg/openacc-define-3.f90 b/gcc/testsuite/gfortran.dg/openacc-define-3.f90
index dcc52b6b4cb5..1a229f82ebba 100644
--- a/gcc/testsuite/gfortran.dg/openacc-define-3.f90
+++ b/gcc/testsuite/gfortran.dg/openacc-define-3.f90
@@ -6,6 +6,6 @@
 # error _OPENACC not defined
 #endif
 
-#if _OPENACC != 201711
+#if _OPENACC != 201811
 # error _OPENACC defined to wrong value
 #endif
diff --git a/libgomp/acc_prof.h b/libgomp/acc_prof.h
index af0fec5840b2..f74c06ba011e 100644
--- a/libgomp/acc_prof.h
+++ b/libgomp/acc_prof.h
@@ -117,9 +117,11 @@ typedef struct acc_prof_info
 				_ACC_PROF_VALID_BYTES_BASICTYPE (_acc_prof_int_t))
 } acc_prof_info;
 
-/* We implement the OpenACC 2.6 Profiling Interface.  */
+/* We implement the OpenACC 2.7 Profiling Interface, or at least according
+   to the OpenACC spec the number in the version field of acc_prof_info must
+   be _OPENACC.  */
 
-#define _ACC_PROF_INFO_VERSION 201711
+#define _ACC_PROF_INFO_VERSION 201811
 
 typedef enum acc_construct_t
 {
diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi
index 0dc923c479d5..e12d4488a5ab 100644
--- a/libgomp/libgomp.texi
+++ b/libgomp/libgomp.texi
@@ -5324,7 +5324,7 @@ See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information.
 
 A complete description of all OpenACC directives accepted may be found in 
 the @uref{https://www.openacc.org, OpenACC} Application Programming
-Interface manual, version 2.6.
+Interface manual, version 2.7.
 
 
 
@@ -5336,7 +5336,7 @@ Interface manual, version 2.6.
 @chapter OpenACC Runtime Library Routines
 
 The runtime routines described here are defined by section 3 of the OpenACC
-specifications in version 2.6.
+specifications in version 2.7.
 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
@@ -5432,7 +5432,7 @@ for the device type specified in @var{devicetype}.
 @end multitable
 
 @item @emph{Reference}:
-@uref{https://www.openacc.org, OpenACC specification v2.6}, section
+@uref{https://www.openacc.org, OpenACC specification v2.7}, section
 3.2.1.
 @end table
 
@@ -6742,7 +6742,7 @@ Function for library registration.
 @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.6.
 The variable @env{ACC_PROFLIB}
 is defined by section 4 of the OpenACC specification in version 2.6.
 
diff --git a/libgomp/openacc.f90 b/libgomp/openacc.f90
index dfac1b00151d..5078e268391c 100644
--- a/libgomp/openacc.f90
+++ b/libgomp/openacc.f90
@@ -868,7 +868,7 @@ module openacc
   public :: acc_attach, acc_attach_async, acc_detach, acc_detach_async
   public :: acc_detach_finalize, acc_detach_finalize_async
 
-  integer, parameter :: openacc_version = 201711
+  integer, parameter :: openacc_version = 201811
 
   interface acc_get_num_devices
     procedure :: acc_get_num_devices_h
diff --git a/libgomp/openacc_lib.h b/libgomp/openacc_lib.h
index 83e5302aa18c..dc0c7a578d48 100644
--- a/libgomp/openacc_lib.h
+++ b/libgomp/openacc_lib.h
@@ -70,7 +70,7 @@
       integer (acc_handle_kind), parameter :: acc_async_noval = -1
       integer (acc_handle_kind), parameter :: acc_async_sync = -2
 
-      integer, parameter :: openacc_version = 201711
+      integer, parameter :: openacc_version = 201811
 
       interface acc_get_num_devices
         function acc_get_num_devices_h (devicetype)
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c
index 0f9e9562bc61..5c05ee3a114d 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c
@@ -16,7 +16,7 @@ static void cb_any_event (acc_prof_info *prof_info, acc_event_info *event_info,
 {
   DEBUG_printf ("%s %d\n", __FUNCTION__, prof_info->event_type);
 
-  assert (prof_info->version == 201711);
+  assert (prof_info->version == 201811);
 
   ++ev_count;
 }
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f b/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f
index 36e9844bb157..8d4e3f35880a 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f
+++ b/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-1.f
@@ -4,6 +4,6 @@
       implicit none
       include "openacc_lib.h"
 
-      if (openacc_version .ne. 201711) STOP 1
+      if (openacc_version .ne. 201811) STOP 1
 
       end program main
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90 b/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90
index e815bc1b8277..c9946c277f6d 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/openacc_version-2.f90
@@ -4,6 +4,6 @@ program main
   use openacc
   implicit none
 
-  if (openacc_version .ne. 201711) STOP 1
+  if (openacc_version .ne. 201811) STOP 1
 
 end program main
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.