+2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91564
+ * check.c (gfc_check_kill_sub): Additional checks on status dummy
+ argument.
+
2019-08-28 Mark Eggleston <mark.eggleston@codethink.com>
* intrinsics.text: Corrected stated standard for intrinsics
if (!scalar_check (status, 2))
return false;
+
+ if (status->expr_type != EXPR_VARIABLE)
+ {
+ gfc_error ("STATUS at %L shall be an INTENT(OUT) variable",
+ &status->where);
+ return false;
+ }
+
+ if (status->expr_type == EXPR_VARIABLE
+ && status->symtree && status->symtree->n.sym
+ && status->symtree->n.sym->attr.intent == INTENT_IN)
+ {
+ gfc_error ("%qs at %L shall be an INTENT(OUT) variable",
+ status->symtree->name, &status->where);
+ return false;
+ }
}
return true;
+2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91564
+ * gfortran.dg/pr91564.f90: New test.
+
2019-08-28 Martin Sebor <msebor@redhat.com>
PR tree-optimization/91457
--- /dev/null
+! { dg-do compile }
+! PR fortran/91564
+! Contributed by Gerhard Steinmetz.
+program p
+ integer i, j
+ call kill (1, 2, 3) ! { dg-error "shall be an INTENT" }
+ i = 42
+ call bar(i, j)
+end
+
+subroutine bar(n, m)
+ integer, intent(in) :: n
+ integer, intent(inout) :: m
+ call kill (1, 3, n) ! { dg-error "shall be an INTENT" }
+ call kill (1, 3, m)
+end subroutine bar