re PR fortran/20865 (statement function shall not be supplied as procedure argument)
PR fortran/20865 * resolve.c (resolve_actual_arglist): Issue an error if a statement functions is used as actual argument. * gfortran.dg/pr20865.f90: New test. From-SVN: r98919
This commit is contained in:
parent
edcd599b95
commit
781e1004f3
@ -1,3 +1,9 @@
|
|||||||
|
2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||||
|
|
||||||
|
PR fortran/20865
|
||||||
|
* resolve.c (resolve_actual_arglist): Issue an error if a statement
|
||||||
|
functions is used as actual argument.
|
||||||
|
|
||||||
2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||||
|
|
||||||
PR fortran/21177
|
PR fortran/21177
|
||||||
|
@ -604,6 +604,12 @@ resolve_actual_arglist (gfc_actual_arglist * arg)
|
|||||||
|| sym->attr.external)
|
|| sym->attr.external)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (sym->attr.proc == PROC_ST_FUNCTION)
|
||||||
|
{
|
||||||
|
gfc_error ("Statement function '%s' at %L is not allowed as an "
|
||||||
|
"actual argument", sym->name, &e->where);
|
||||||
|
}
|
||||||
|
|
||||||
/* If the symbol is the function that names the current (or
|
/* If the symbol is the function that names the current (or
|
||||||
parent) scope, then we really have a variable reference. */
|
parent) scope, then we really have a variable reference. */
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||||
|
|
||||||
|
PR fortran/20865
|
||||||
|
* gfortran.dg/pr20865.f90: New test.
|
||||||
|
|
||||||
2005-04-28 Joseph S. Myers <joseph@codesourcery.com>
|
2005-04-28 Joseph S. Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* gcc.dg/void-cast-2.c: New test.
|
* gcc.dg/void-cast-2.c: New test.
|
||||||
|
10
gcc/testsuite/gfortran.dg/pr20865.f90
Normal file
10
gcc/testsuite/gfortran.dg/pr20865.f90
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
! { dg-do compile }
|
||||||
|
! PR fortran/20865
|
||||||
|
subroutine tt(j)
|
||||||
|
integer :: j
|
||||||
|
end subroutine
|
||||||
|
|
||||||
|
integer :: i, st
|
||||||
|
st(i) = (i*i+2)
|
||||||
|
call tt(st) ! { dg-error "Statement function .* is not allowed as an actual argument" }
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user