From: Jakub Jelinek <jakub@redhat.com>
To: Marcel Vollweiler <marcel@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Re: [PATCH] OpenMP, Fortran: Bugfix for omp_set_num_teams.
Date: Tue, 15 Mar 2022 18:28:47 +0100 [thread overview]
Message-ID: <YjDMz3Fvu21aMltr@tucnak> (raw)
In-Reply-To: <498625bc-2ca0-8f5e-89df-03453a2c96a8@codesourcery.com>
On Tue, Mar 15, 2022 at 06:05:48PM +0100, Marcel Vollweiler wrote:
> Hi,
>
> This patch fixes a small bug for omp_set_num_teams in fortran.c.
>
> Marcel
> -----------------
> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
> 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_): Fix bug.
Thanks for spotting this, but would be nice to cover it with
a testcase.
! { dg-do run }
! { dg-additional-options "-fdefault-integer-8" }
program set_num_teams_8
use omp_lib
omp_set_num_teams (42)
if (omp_get_num_teams () .ne. 42) stop 1
end program
or so would IMHO do it, please test that it FAILs without your fortran.c
fix and succeeds with it.
Ok for trunk with that change.
> diff --git a/libgomp/fortran.c b/libgomp/fortran.c
> index 8c1cfd1..d984ce5 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
Jakub
next prev parent reply other threads:[~2022-03-15 17:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 17:05 Marcel Vollweiler
2022-03-15 17:28 ` Jakub Jelinek [this message]
2022-03-16 13:06 ` Marcel Vollweiler
2022-03-16 13:36 ` Jakub Jelinek
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=YjDMz3Fvu21aMltr@tucnak \
--to=jakub@redhat.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=marcel@codesourcery.com \
/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: link
Be 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).