2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/81849
* resolve.c (resolve_symbol): Host associated varaibles can appear
in the specification statement of a RESULT array.
2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/81849
* gfortran.dg/pr81849.f90: New test.
From-SVN: r267948
+2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/81849
+ * resolve.c (resolve_symbol): Host associated varaibles can appear
+ in the specification statement of a RESULT array.
+
2019-01-15 Paul Thomas <pault@gcc.gnu.org>
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
/* Set the formal_arg_flag so that check_conflict will not throw
an error for host associated variables in the specification
expression for an array_valued function. */
- if (sym->attr.function && sym->as)
+ if ((sym->attr.function || sym->attr.result) && sym->as)
formal_arg_flag = true;
saved_specification_expr = specification_expr;
+2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/81849
+ * gfortran.dg/pr81849.f90: New test.
+
2019-01-15 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/ISO_Fortran_binding_2.c : Change reference to
--- /dev/null
+! { dg-do run }
+! PR fortran/81849
+program p
+ implicit none
+ integer :: n=3
+ if (any(g() /= f())) stop 1
+ contains
+ function g()
+ real g(n)
+ g = 7
+ end function g
+ function f() result(r)
+ real r(n)
+ r = 7
+ end function f
+end program