gfc_expr **expr = NULL, const char *dupl_msg = NULL)
{
match m;
+ char c;
locus old_loc = gfc_current_locus;
if ((m = gfc_match (name)) != MATCH_YES)
return m;
+ /* Ensure that no partial string is matched. */
+ if (gfc_current_form == FORM_FREE
+ && gfc_match_eos () != MATCH_YES
+ && ((c = gfc_peek_ascii_char ()) == '_' || ISALNUM (c)))
+ {
+ gfc_current_locus = old_loc;
+ return MATCH_NO;
+ }
if (!not_dupl)
{
if (dupl_msg)
if (m == MATCH_ERROR)
goto error;
c->memorder = OMP_MEMORDER_ACQ_REL;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_MEMORDER)
if (m == MATCH_ERROR)
goto error;
c->memorder = OMP_MEMORDER_ACQUIRE;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_AFFINITY)
gfc_default_integer_kind,
&gfc_current_locus);
mpz_set_si (c->async_expr->value.integer, GOMP_ASYNC_NOVAL);
- needs_space = true;
}
continue;
}
if (m == MATCH_ERROR)
goto error;
c->par_auto = true;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_ATTACH)
if (m == MATCH_ERROR)
goto error;
c->capture = true;
- needs_space = true;
continue;
}
if (mask & OMP_CLAUSE_COLLAPSE)
if (m == MATCH_ERROR)
goto error;
c->compare = true;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_ASSUMPTIONS)
if (m == MATCH_ERROR)
goto error;
c->finalize = true;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_FIRSTPRIVATE)
{
if (m == MATCH_ERROR)
goto error;
- c->full = needs_space = true;
+ c->full = true;
continue;
}
break;
gfc_current_locus = old_loc;
break;
}
- else if (m == MATCH_NO)
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_GRAINSIZE)
if (m == MATCH_ERROR)
goto error;
c->if_present = true;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_IF)
{
if (m == MATCH_ERROR)
goto error;
- c->inbranch = needs_space = true;
+ c->inbranch = true;
continue;
}
if ((mask & OMP_CLAUSE_INDEPENDENT)
if (m == MATCH_ERROR)
goto error;
c->independent = true;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_INDIRECT)
{
if (m == MATCH_ERROR)
goto error;
- c->mergeable = needs_space = true;
+ c->mergeable = true;
continue;
}
if ((mask & OMP_CLAUSE_MESSAGE)
OMP_MAP_IF_PRESENT, true,
allow_derived))
continue;
+ if ((mask & OMP_CLAUSE_ASSUMPTIONS)
+ && (m = gfc_match_dupl_check (!c->assume
+ || !c->assume->no_openmp_constructs,
+ "no_openmp_constructs")) != MATCH_NO)
+ {
+ if (m == MATCH_ERROR)
+ goto error;
+ if (c->assume == NULL)
+ c->assume = gfc_get_omp_assumptions ();
+ c->assume->no_openmp_constructs = true;
+ continue;
+ }
if ((mask & OMP_CLAUSE_ASSUMPTIONS)
&& (m = gfc_match_dupl_check (!c->assume
|| !c->assume->no_openmp_routines,
- "no_openmp_routines")) == MATCH_YES)
+ "no_openmp_routines")) != MATCH_NO)
{
if (m == MATCH_ERROR)
goto error;
if (c->assume == NULL)
c->assume = gfc_get_omp_assumptions ();
- c->assume->no_openmp_routines = needs_space = true;
+ c->assume->no_openmp_routines = true;
continue;
}
if ((mask & OMP_CLAUSE_ASSUMPTIONS)
&& (m = gfc_match_dupl_check (!c->assume || !c->assume->no_openmp,
- "no_openmp")) == MATCH_YES)
+ "no_openmp")) != MATCH_NO)
{
if (m == MATCH_ERROR)
goto error;
if (c->assume == NULL)
c->assume = gfc_get_omp_assumptions ();
- c->assume->no_openmp = needs_space = true;
+ c->assume->no_openmp = true;
continue;
}
if ((mask & OMP_CLAUSE_ASSUMPTIONS)
&& (m = gfc_match_dupl_check (!c->assume
|| !c->assume->no_parallelism,
- "no_parallelism")) == MATCH_YES)
+ "no_parallelism")) != MATCH_NO)
{
if (m == MATCH_ERROR)
goto error;
if (c->assume == NULL)
c->assume = gfc_get_omp_assumptions ();
- c->assume->no_parallelism = needs_space = true;
+ c->assume->no_parallelism = true;
continue;
}
{
if (m == MATCH_ERROR)
goto error;
- c->nogroup = needs_space = true;
+ c->nogroup = true;
continue;
}
if ((mask & OMP_CLAUSE_NOHOST)
{
if (m == MATCH_ERROR)
goto error;
- c->nohost = needs_space = true;
+ c->nohost = true;
continue;
}
if ((mask & OMP_CLAUSE_NOTEMPORAL)
{
if (m == MATCH_ERROR)
goto error;
- c->notinbranch = needs_space = true;
+ c->notinbranch = true;
continue;
}
if ((mask & OMP_CLAUSE_NOWAIT)
{
if (m == MATCH_ERROR)
goto error;
- c->nowait = needs_space = true;
+ c->nowait = true;
continue;
}
if ((mask & OMP_CLAUSE_NUM_GANGS)
}
break;
case 'o':
- if ((mask & OMP_CLAUSE_ORDER)
- && (m = gfc_match_dupl_check (!c->order_concurrent, "order ("))
- != MATCH_NO)
- {
- if (m == MATCH_ERROR)
- goto error;
- if (gfc_match (" reproducible : concurrent )") == MATCH_YES)
- c->order_reproducible = true;
- else if (gfc_match (" concurrent )") == MATCH_YES)
- ;
- else if (gfc_match (" unconstrained : concurrent )") == MATCH_YES)
- c->order_unconstrained = true;
- else
- {
- gfc_error ("Expected ORDER(CONCURRENT) at %C "
- "with optional %<reproducible%> or "
- "%<unconstrained%> modifier");
- goto error;
- }
- c->order_concurrent = true;
- continue;
- }
if ((mask & OMP_CLAUSE_ORDERED)
&& (m = gfc_match_dupl_check (!c->ordered, "ordered"))
!= MATCH_NO)
continue;
}
- needs_space = true;
+ continue;
+ }
+ if ((mask & OMP_CLAUSE_ORDER)
+ && (m = gfc_match_dupl_check (!c->order_concurrent, "order", true))
+ != MATCH_NO)
+ {
+ if (m == MATCH_ERROR)
+ goto error;
+ if (gfc_match (" reproducible : concurrent )") == MATCH_YES)
+ c->order_reproducible = true;
+ else if (gfc_match (" concurrent )") == MATCH_YES)
+ ;
+ else if (gfc_match (" unconstrained : concurrent )") == MATCH_YES)
+ c->order_unconstrained = true;
+ else
+ {
+ gfc_error ("Expected ORDER(CONCURRENT) at %C "
+ "with optional %<reproducible%> or "
+ "%<unconstrained%> modifier");
+ goto error;
+ }
+ c->order_concurrent = true;
continue;
}
break;
if (m == MATCH_ERROR)
goto error;
c->atomic_op = GFC_OMP_ATOMIC_READ;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_REDUCTION)
if (m == MATCH_ERROR)
goto error;
c->memorder = OMP_MEMORDER_RELAXED;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_MEMORDER)
if (m == MATCH_ERROR)
goto error;
c->memorder = OMP_MEMORDER_RELEASE;
- needs_space = true;
continue;
}
break;
break;
}
else if (m == MATCH_NO)
- {
- c->self_expr = gfc_get_logical_expr (gfc_default_logical_kind,
- NULL, true);
- needs_space = true;
- }
+ c->self_expr = gfc_get_logical_expr (gfc_default_logical_kind,
+ NULL, true);
continue;
}
if ((mask & OMP_CLAUSE_SELF)
if (m == MATCH_ERROR)
goto error;
c->seq = true;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_MEMORDER)
if (m == MATCH_ERROR)
goto error;
c->memorder = OMP_MEMORDER_SEQ_CST;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_SHARED)
{
if (m == MATCH_ERROR)
goto error;
- c->simd = needs_space = true;
+ c->simd = true;
continue;
}
if ((mask & OMP_CLAUSE_SEVERITY)
{
if (m == MATCH_ERROR)
goto error;
- c->threads = needs_space = true;
+ c->threads = true;
continue;
}
if ((mask & OMP_CLAUSE_TILE)
{
if (m == MATCH_ERROR)
goto error;
- c->untied = needs_space = true;
+ c->untied = true;
continue;
}
if ((mask & OMP_CLAUSE_ATOMIC)
if (m == MATCH_ERROR)
goto error;
c->atomic_op = GFC_OMP_ATOMIC_UPDATE;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_USE)
m = match_oacc_clause_gwv (c, GOMP_DIM_VECTOR);
if (m == MATCH_ERROR)
goto error;
- if (m == MATCH_NO)
- needs_space = true;
continue;
}
break;
if (m == MATCH_ERROR)
goto error;
c->weak = true;
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_WORKER)
m = match_oacc_clause_gwv (c, GOMP_DIM_WORKER);
if (m == MATCH_ERROR)
goto error;
- else if (m == MATCH_NO)
- needs_space = true;
continue;
}
if ((mask & OMP_CLAUSE_ATOMIC)
if (m == MATCH_ERROR)
goto error;
c->atomic_op = GFC_OMP_ATOMIC_WRITE;
- needs_space = true;
continue;
}
break;
gfc_current_ns->omp_assumes->no_openmp |= c->assume->no_openmp;
gfc_current_ns->omp_assumes->no_openmp_routines
|= c->assume->no_openmp_routines;
+ gfc_current_ns->omp_assumes->no_openmp_constructs
+ |= c->assume->no_openmp_constructs;
gfc_current_ns->omp_assumes->no_parallelism |= c->assume->no_parallelism;
if (gfc_current_ns->omp_assumes->holds && c->assume->holds)
{