2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85687
* check.c (gfc_check_rank): Check that the argument is a data object.
2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85687
* gfortran.dg/pr85687.f90: new test.
From-SVN: r260141
+2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85687
+ * check.c (gfc_check_rank): Check that the argument is a data object.
+
2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85521
? a->value.function.esym->result->attr.pointer
: a->symtree->n.sym->result->attr.pointer;
- if (a->expr_type == EXPR_OP || a->expr_type == EXPR_NULL
- || a->expr_type == EXPR_COMPCALL|| a->expr_type == EXPR_PPC
+ if (a->expr_type == EXPR_OP
+ || a->expr_type == EXPR_NULL
+ || a->expr_type == EXPR_COMPCALL
+ || a->expr_type == EXPR_PPC
+ || a->ts.type == BT_PROCEDURE
|| !is_variable)
{
gfc_error ("The argument of the RANK intrinsic at %L must be a data "
+2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/85687
+ * gfortran.dg/pr85687.f90: new test.
+
2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85521
--- /dev/null
+! { dg-do compile }
+! PR fortran/85687
+! Code original contributed by Gerhard Steinmetz gscfq at t-oline dot de
+program p
+ type t
+ end type
+ print *, rank(t) ! { dg-error "must be a data object" }
+end