public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7674] OpenMP, Fortran: Bugfix for omp_set_num_teams.
@ 2022-03-16 14:41 Marcel Vollweiler
0 siblings, 0 replies; only message in thread
From: Marcel Vollweiler @ 2022-03-16 14:41 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:be093b8dcc9cf5c9f99479ec68f1abe95aa38a83
commit r12-7674-gbe093b8dcc9cf5c9f99479ec68f1abe95aa38a83
Author: Marcel Vollweiler <marcel@codesourcery.com>
Date: Wed Mar 16 07:38:54 2022 -0700
OpenMP, Fortran: Bugfix for omp_set_num_teams.
This patch fixes a small bug in the omp_set_num_teams implementation.
libgomp/ChangeLog:
* fortran.c (omp_set_num_teams_8_): Call omp_set_num_teams instead of
omp_set_max_active_levels.
* testsuite/libgomp.fortran/icv-8.f90: New test.
Diff:
---
libgomp/fortran.c | 2 +-
libgomp/testsuite/libgomp.fortran/icv-8.f90 | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/libgomp/fortran.c b/libgomp/fortran.c
index 8c1cfd10971..d984ce5c6f8 100644
--- a/libgomp/fortran.c
+++ b/libgomp/fortran.c
@@ -491,7 +491,7 @@ omp_set_num_teams_ (const int32_t *num_teams)
void
omp_set_num_teams_8_ (const int64_t *num_teams)
{
- omp_set_max_active_levels (TO_INT (*num_teams));
+ omp_set_num_teams (TO_INT (*num_teams));
}
int32_t
diff --git a/libgomp/testsuite/libgomp.fortran/icv-8.f90 b/libgomp/testsuite/libgomp.fortran/icv-8.f90
new file mode 100644
index 00000000000..9478c158596
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/icv-8.f90
@@ -0,0 +1,10 @@
+! This tests 'set_num_teams_8' function.
+
+program set_num_teams_8
+ use omp_lib
+ use, intrinsic :: iso_fortran_env
+ integer(int64) :: x
+ x = 42
+ call omp_set_num_teams (x)
+ if (omp_get_max_teams () .ne. 42) stop 1
+end program
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-16 14:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 14:41 [gcc r12-7674] OpenMP, Fortran: Bugfix for omp_set_num_teams Marcel Vollweiler
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).