This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp] Disallow 'nowait' in combined parallel+workshare directives
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 31 Oct 2005 14:01:36 -0500
- Subject: Re: [gomp] Disallow 'nowait' in combined parallel+workshare directives
- References: <200510311357.40495.dnovillo@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Oct 31, 2005 at 01:57:40PM -0500, Diego Novillo wrote:
>
> The standard does not allow 'nowait' in combined parallel+workshare
> directives.
>
> Jakub, I'm not quite sure whether Fortran already checks for this. If it
> doesn't, could you add it? Thanks.
Yes, it doesn't allow that.
Fortran is different, as nowait clause is on the !$omp end something
directive, so the code in question that prevents that is in parse.c:
match ("end do", gfc_match_omp_end_nowait, ST_OMP_END_DO);
...
match ("end parallel do", gfc_match_omp_eos, ST_OMP_END_PARALLEL_DO);
match ("end parallel sections", gfc_match_omp_eos,
ST_OMP_END_PARALLEL_SECTIONS);
match ("end parallel workshare", gfc_match_omp_eos,
ST_OMP_END_PARALLEL_WORKSHARE);
match ("end parallel", gfc_match_omp_eos, ST_OMP_END_PARALLEL);
match ("end sections", gfc_match_omp_end_nowait, ST_OMP_END_SECTIONS);
...
match ("end workshare", gfc_match_omp_end_nowait,
ST_OMP_END_WORKSHARE);
gfc_match_omp_eos requires no clauses, gfc_match_omp_end_nowait allows
just nowait clause or nothing.
Jakub