On 20 November 2018 22:54:49 CET, Julian Brown <jul...@codesourcery.com> wrote: > >Previously posted upstream: >https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00826.html
As said in https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00861.html + bool array_only_p = true; + /* Disallow duplicate bare variable references and multiple + subarrays of the same array here, but allow multiple components of + the same (e.g. derived-type) variable. For the latter, duplicate + components are detected elsewhere. */ + if (openacc && n->expr && n->expr->expr_type == EXPR_VARIABLE) + for (gfc_ref *ref = n->expr->ref; ref; ref = ref->next) + if (ref->type != REF_ARRAY) + array_only_p = false; Looks like you could break here when setting array_only_p to false. + if (array_only_p) + { + if (n->sym->mark) + gfc_error ("Symbol %qs present on multiple clauses at %L", + n->sym->name, &n->where); + else + n->sym->mark = 1; + } } + if (ptr && (region_type & ORT_ACC) != 0) + { + /* Turning a GOMP_MAP_ALWAYS_POINTER clause into a + GOMP_MAP_ATTACH clause after we have detected a case + that needs a GOMP_MAP_STRUCT mapping adding. As said: s/adding/added/ i think.