aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r--gcc/fortran/openmp.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 44fcb9d..bda7f28 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -6048,18 +6048,14 @@ gfc_resolve_oacc_declare (gfc_namespace *ns)
for (n = oc->clauses->lists[list]; n; n = n->next)
{
n->sym->mark = 0;
- if (n->sym->attr.function || n->sym->attr.subroutine)
+ if (n->sym->attr.flavor != FL_VARIABLE
+ && (n->sym->attr.flavor != FL_PROCEDURE
+ || n->sym->result != n->sym))
{
gfc_error ("Object %qs is not a variable at %L",
n->sym->name, &oc->loc);
continue;
}
- if (n->sym->attr.flavor == FL_PARAMETER)
- {
- gfc_error ("PARAMETER object %qs is not allowed at %L",
- n->sym->name, &oc->loc);
- continue;
- }
if (n->expr && n->expr->ref->type == REF_ARRAY)
{