https://gcc.gnu.org/g:cd09bc9e3c240154095200ef38eea2bdf7de4ebf
commit cd09bc9e3c240154095200ef38eea2bdf7de4ebf Author: Chung-Lin Tang <clt...@baylibre.com> Date: Fri Apr 11 08:46:12 2025 +0000 OpenACC 2.7: update references to supported version to 2.7/201811. 2025-04-11 Chung-Lin Tang <clt...@baylibre.com> 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 <sloosem...@baylibre.com> 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 4589ee4a3a62..15596dbfa545 100644 --- a/gcc/c-family/c-cppbuiltin.cc +++ b/gcc/c-family/c-cppbuiltin.cc @@ -1631,7 +1631,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=201511"); diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 0978c4c41b25..ec68c85e2b7b 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -10695,7 +10695,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 1b7042056460..ffddee43a37f 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=201511"); diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index 8c160e58b00a..a7171bf31957 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -15787,7 +15787,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 @@ -15801,9 +15801,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 635d0a1bafce..07ce41b290db 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 c5793c1ce113..d7190a4945cf 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -4712,7 +4712,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. @@ -4724,7 +4724,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 @@ -4819,7 +4819,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 @@ -6091,7 +6091,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 8ef107e959d8..a3d7bcbd7624 100644 --- a/libgomp/openacc.f90 +++ b/libgomp/openacc.f90 @@ -798,7 +798,7 @@ module openacc public :: acc_memcpy_to_device, acc_memcpy_to_device_async public :: acc_memcpy_from_device, acc_memcpy_from_device_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 b0d287ed5f86..d83057421819 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