On Tue, Nov 03, 2015 at 07:06:50PM -0800, Cesar Philippidis wrote:
> @@ -856,13 +857,14 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, uint64_t
> mask,
> if ((mask & OMP_CLAUSE_DEFAULT)
> && c->default_sharing == OMP_DEFAULT_UNKNOWN)
> {
> - if (gfc_match ("default ( shared )") == MATCH_YES)
> + if (!openacc && gfc_match ("default ( shared )") == MATCH_YES)
> c->default_sharing = OMP_DEFAULT_SHARED;
> - else if (gfc_match ("default ( private )") == MATCH_YES)
> + else if (!openacc && gfc_match ("default ( private )") == MATCH_YES)
> c->default_sharing = OMP_DEFAULT_PRIVATE;
> else if (gfc_match ("default ( none )") == MATCH_YES)
> c->default_sharing = OMP_DEFAULT_NONE;
> - else if (gfc_match ("default ( firstprivate )") == MATCH_YES)
> + else if (!openacc
> + && gfc_match ("default ( firstprivate )") == MATCH_YES)
> c->default_sharing = OMP_DEFAULT_FIRSTPRIVATE;
I'd rewrite this as:
if (gfc_match ("default ( none )") == MATCH_YES)
c->default_sharing = OMP_DEFAULT_NONE;
else if (openacc)
/* c->default_sharing = OMP_DEFAULT_UNKNOWN */;
else if (gfc_match ("default ( shared )") == MATCH_YES)
...
> if (c->default_sharing != OMP_DEFAULT_UNKNOWN)
> continue;
> @@ -1304,10 +1306,19 @@ match
> gfc_match_oacc_update (void)
> {
> gfc_omp_clauses *c;
> + locus here = gfc_current_locus;
> +
> if (gfc_match_omp_clauses (&c, OACC_UPDATE_CLAUSES, false, false, true)
> != MATCH_YES)
> return MATCH_ERROR;
>
> + if (!c->lists[OMP_LIST_MAP])
> + {
> + gfc_error ("%<acc update%> must contain at least one "
> + "%<device%> or %<host/self%> clause at %L", &here);
There is no host/self clause I'd guess, so you should spell those
separately.
Otherwise, LGTM.
Jakub