2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91641
* check.c (gfc_check_is_contiguous): null() cannot be an actual
argument to is_contiguous().
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91641
* gfortran.dg/pr91641.f90: New test.
From-SVN: r276272
+2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91641
+ * check.c (gfc_check_is_contiguous): null() cannot be an actual
+ argument to is_contiguous().
+
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91714
bool
gfc_check_is_contiguous (gfc_expr *array)
{
+ if (array->expr_type == EXPR_NULL
+ && array->symtree->n.sym->attr.pointer == 1)
+ {
+ gfc_error ("Actual argument at %L of %qs intrinsic shall be an "
+ "associated pointer", &array->where, gfc_current_intrinsic);
+ return false;
+ }
+
if (!array_check (array, 0))
return false;
}
-
bool
gfc_check_isatty (gfc_expr *unit)
{
+2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91641
+ * gfortran.dg/pr91641.f90: New test.
+
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91714
--- /dev/null
+! { dg-do compile }
+! PR fortran/91641
+! Code conyributed by Gerhard Steinmetz
+program p
+ real, pointer :: z(:)
+ print *, is_contiguous (null(z)) ! { dg-error "shall be an associated" }
+end