I recently stumbled over the intrinsic module documentation and wondered
whether it was complete. Answer: It wasn't. Cf.
https://gcc.gnu.org/onlinedocs/gfortran/OpenMP-Modules-OMP_005fLIB-and-OMP_005fLIB_005fKINDS.html
Pause was added 8th Nov 2018 → GCC 9. The lock hint already 2015-10-13.
Hence, the patch "as is" applies also to GCC 9 while for GCC 8, one has
to remove the "pause" bit before applying.
OK? – And for which branches?
Tobias
PR fortran/93541
* intrinisic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS):
Add undocumented parameters from omp_lib.f90.in.
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 823cb9cef30..842c88b2eba 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -15307,13 +15307,16 @@ below.
For details refer to the actual
@uref{http://www.openmp.org/wp-content/uploads/openmp-4.5.pdf,
OpenMP Application Program Interface v4.5}.
+And for the @code{pause}-related constants to the OpenMP 5.0 specification.
@code{OMP_LIB_KINDS} provides the following scalar default-integer
named constants:
@table @asis
@item @code{omp_lock_kind}
+@item @code{omp_lock_hint_kind}
@item @code{omp_nest_lock_kind}
+@item @code{omp_pause_resource_kind}
@item @code{omp_proc_bind_kind}
@item @code{omp_sched_kind}
@end table
@@ -15344,6 +15347,24 @@ kind @code{omp_proc_bind_kind}:
@item @code{omp_proc_bind_spread}
@end table
+The following scalar integer named constants are of the
+kind @code{omp_lock_hint_kind}:
+
+@table @asis
+@item @code{omp_lock_hint_none}
+@item @code{omp_lock_hint_uncontended}
+@item @code{omp_lock_hint_contended}
+@item @code{omp_lock_hint_nonspeculative}
+@item @code{omp_lock_hint_speculative}
+@end table
+
+And the following two scalar integer named constants are of the
+kind @code{omp_pause_resource_kind}:
+
+@table @asis
+@item @code{omp_pause_soft}
+@item @code{omp_pause_hard}
+@end table
@node OpenACC Module OPENACC