From: Jakub Jelinek <jakub@redhat.com>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch] OpenMP: detach - fix firstprivate handling
Date: Wed, 12 May 2021 16:55:25 +0200 [thread overview]
Message-ID: <20210512145525.GT1179226@tucnak> (raw)
In-Reply-To: <9e2b02be-abf4-7bf6-e12d-11fcbeb201fc@codesourcery.com>
On Tue, May 11, 2021 at 11:54:58PM +0200, Tobias Burnus wrote:
> The sfield / firstprivate lookup used the wrong var decl
> for the lookup – hence it failed.
> I used an extra long diff to make it easier to follow why
> 'c' and not 'detach_clause' has the proper clause for the
> decl to be used as key.
>
> Testsuite run ongoing.
> OK for mainline, when it passes?
>
> Tobias
>
> -----------------
> Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf
> OpenMP: detach - fix firstprivate handling
> gcc/ChangeLog:
>
> * omp-low.c (finish_taskreg_scan): Use the proper detach decl.
>
> libgomp/ChangeLog:
>
> * testsuite/libgomp.fortran/detach-1.f90: New test.
LGTM, but please add also a libgomp.c-c++-common/task-detach-12.c testcase
like:
/* { dg-do run } */
/* { dg-options "-fopenmp" } */
#include <omp.h>
int
main ()
{
struct S { int a[7]; } s = { { 1, 2, 3, 4, 5, 6, 7 } };
omp_event_handle_t x;
#pragma omp parallel master
#pragma omp task firstprivate (s) detach (x)
{
if (s.a[3] != 4)
__builtin_abort ();
omp_fulfill_event (x);
}
return 0;
}
Also, please backport to 11 after a while.
Thanks.
Jakub
prev parent reply other threads:[~2021-05-12 14:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 21:54 Tobias Burnus
2021-05-12 14:55 ` Jakub Jelinek [this message]
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=20210512145525.GT1179226@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=tobias@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).