PR fortran/85701
gcc/fortran/
* openmp.c (gfc_resolve_oacc_declare): Error on functions and
subroutine data clause arguments.
gcc/testsuite/
* gfortran.dg/goacc/pr85701.f90: New test.
From-SVN: r261202
+2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR fortran/85701
+
+ * openmp.c (gfc_resolve_oacc_declare): Error on functions and
+ subroutine data clause arguments.
+
2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85981
for (n = oc->clauses->lists[list]; n; n = n->next)
{
n->sym->mark = 0;
+ if (n->sym->attr.function || n->sym->attr.subroutine)
+ {
+ 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",
+2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR fortran/85701
+ * gfortran.dg/goacc/pr85701.f90: New test.
+
2018-06-05 Marek Polacek <polacek@redhat.com>
PR c++/85976
--- /dev/null
+! PR fortran/85701
+! { dg-do compile }
+
+subroutine s1
+ !$acc declare copy(s1) ! { dg-error "is not a variable" }
+end
+
+subroutine s2
+ !$acc declare present(s2) ! { dg-error "is not a variable" }
+end
+
+function f1 ()
+ !$acc declare copy(f1) ! { dg-error "is not a variable" }
+end
+
+function f2 ()
+ !$acc declare present(f2) ! { dg-error "is not a variable" }
+end
+
+program p
+ !$acc declare copy(p) ! { dg-error "is not a variable" }
+end
+