re PR fortran/81849 (Size of automatic array argument specified by host-associated variable.)
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
This commit is contained in:
parent
92f3a180aa
commit
a81a6d5836
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -15345,7 +15345,7 @@ resolve_symbol (gfc_symbol *sym)
|
|||
/* 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;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
! { 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
|
Loading…
Reference in New Issue