On Wed, May 20, 2015 at 11:32:20AM +0200, Thomas Schwinge wrote:
> Hi!
>
> On Wed, 20 May 2015 10:43:27 +0200, Jakub Jelinek <[email protected]> wrote:
> > On Wed, May 20, 2015 at 10:23:21AM +0200, Thomas Schwinge wrote:
> > > I see that some checking is also being done gcc/omp-low.c:scan_omp_for:
> > > »gang, worker and vector may occur only once in a loop nest«, and »gang,
> > > worker and vector must occur in this order in a loop nest«. Don't know
> > > if that conceptually also belongs into
> > > gcc/omp-low.c:check_omp_nesting_restrictions?
> >
> > Doesn't look like anything related to construct/region nesting...
>
> It is checking invalid nesting of loop constructs, for example:
>
> #pragma acc loop gang
> for [...]
> {
> #pragma acc loop gang // gang, worker and vector may occur only once in a
> loop nest
> for [...]
>
> ..., or:
>
> #pragma acc loop vector
> for [...]
> {
> #pragma acc loop gang // gang, worker and vector must occur in this order
> in a loop nest
> for [...]
>
> ..., and so on.
Ah, in that case it is the right function for that.
Jakub