This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp] Disallow 'nowait' in combined parallel+workshare directives


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]