+2019-09-06 Andrew Stubbs <ams@codesourcery.com>
+
+ Backport from mainline:
+
+ 2019-07-05 Andrew Stubbs <ams@codesourcery.com>
+
+ * openmp.c (resolve_omp_clauses): Add custom error messages for
+ parameters in map clauses.
+
2019-07-10 Julian Brown <julian@codesourcery.com>
* trans-openmp.c (gfc_omp_finish_clause): Change clauses mapping
continue;
}
}
- gfc_error ("Object %qs is not a variable at %L", n->sym->name,
- &n->where);
+ if (list == OMP_LIST_MAP
+ && n->sym->attr.flavor == FL_PARAMETER)
+ {
+ if (openacc)
+ gfc_error ("Object %qs is not a variable at %L; parameters"
+ " cannot be and need not be copied", n->sym->name,
+ &n->where);
+ else
+ gfc_error ("Object %qs is not a variable at %L; parameters"
+ " cannot be and need not be mapped", n->sym->name,
+ &n->where);
+ }
+ else
+ gfc_error ("Object %qs is not a variable at %L", n->sym->name,
+ &n->where);
}
for (list = 0; list < OMP_LIST_NUM; list++)