public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Marcel Vollweiler <marcel@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-7674] OpenMP, Fortran: Bugfix for omp_set_num_teams. Date: Wed, 16 Mar 2022 14:41:17 +0000 (GMT) [thread overview] Message-ID: <20220316144117.190FF384602A@sourceware.org> (raw) 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
reply other threads:[~2022-03-16 14:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220316144117.190FF384602A@sourceware.org \ --to=marcel@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).