Commit 6e158c5f by Andrew Stubbs Committed by Andrew Stubbs

Tweak error message for mapped parameters.

2019-07-05  Andrew Stubbs  <ams@codesourcery.com>

	gcc/fortran/
	* openmp.c (resolve_omp_clauses): Add custom error messages for
	parameters in map clauses.

From-SVN: r273143
parent 899a1997
2019-07-05 Andrew Stubbs <ams@codesourcery.com>
* openmp.c (resolve_omp_clauses): Add custom error messages for
parameters in map clauses.
2019-07-03 Martin Liska <mliska@suse.cz> 2019-07-03 Martin Liska <mliska@suse.cz>
* check.c (gfc_check_c_funloc): Remove * check.c (gfc_check_c_funloc): Remove
......
...@@ -4208,8 +4208,21 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses, ...@@ -4208,8 +4208,21 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
continue; continue;
} }
} }
gfc_error ("Object %qs is not a variable at %L", n->sym->name, if (list == OMP_LIST_MAP
&n->where); && 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++) for (list = 0; list < OMP_LIST_NUM; list++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment