public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, fortran <fortran@gcc.gnu.org>
Subject: Re: [Patch][v2] OpenMP/Fortran: Fix loop-iter var privatization with !$OMP LOOP [PR108512]
Date: Wed, 15 Feb 2023 11:07:51 +0100	[thread overview]
Message-ID: <Y+yu94bInA0SNrhq@tucnak> (raw)
In-Reply-To: <c2adb2ed-065a-cc9b-ed6b-29b2783c6651@codesourcery.com>

On Fri, Feb 10, 2023 at 12:52:47PM +0100, Tobias Burnus wrote:
> > I'm afraid this is needed but insufficient.
> > I think
> >              case EXEC_OMP_MASKED_TASKLOOP:
> >              case EXEC_OMP_MASKED_TASKLOOP_SIMD:
> >              case EXEC_OMP_MASTER_TASKLOOP:
> >              case EXEC_OMP_MASTER_TASKLOOP_SIMD:
> >           case EXEC_OMP_PARALLEL_LOOP:
> >           case EXEC_OMP_TARGET_PARALLEL_LOOP:
> >           case EXEC_OMP_TARGET_TEAMS_LOOP:
> >           case EXEC_OMP_TARGET_SIMD:
> >           case EXEC_OMP_TEAMS_LOOP:
> > should be in the list above (of course alphabetically sorted in between the
> > others)
> >             gfc_resolve_omp_parallel_blocks (code, ns);
> 
> I think 'TARGET_SIMD' shouldn't be resolved though parallel blocks but

You're right, we use gfc_resolve_omp_parallel_blocks for
parallel, teams, task but not for target alone.

> can call directly call gfc_resolve_omp_do_blocks (as
> currently/previously implemented). The masked version were already
> handled inside gfc_resolve_omp_parallel_blocks but missing in
> gfc_resolve_code, while the 'loop' ones had to be added to both.
> 
> (I did not extend the testcase, but I updated two to add additional
> dg-error to the same line.)

> gcc/fortran/ChangeLog:
> 
> 	PR fortran/108512
> 	* openmp.cc (gfc_resolve_omp_parallel_blocks): Handle combined 'loop'
> 	directives.
> 	(gfc_resolve_do_iterator): Set a source location for added
> 	'private'-clause arguments.
> 	* resolve.cc (gfc_resolve_code): Call gfc_resolve_omp_do_blocks
> 	also for EXEC_OMP_LOOP and gfc_resolve_omp_parallel_blocks for
> 	combined directives with loop + '{masked,master} taskloop (simd)'.
> 
> gcc/testsuite/ChangeLog:
> 
> 	PR fortran/108512
> 	* gfortran.dg/gomp/loop-5.f90: New test.
> 	* gfortran.dg/gomp/loop-2.f90: Update dg-error.
> 	* gfortran.dg/gomp/taskloop-2.f90: Update dg-error.

LGTM, thanks.

	Jakub


      reply	other threads:[~2023-02-15 10:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 15:24 [Patch] " Tobias Burnus
2023-01-31 11:20 ` Jakub Jelinek
2023-02-10 11:52   ` [Patch][v2] " Tobias Burnus
2023-02-15 10:07     ` 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=Y+yu94bInA0SNrhq@tucnak \
    --to=jakub@redhat.com \
    --cc=fortran@gcc.gnu.org \
    --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).