aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>2005-04-28 13:56:08 +0200
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2005-04-28 11:56:08 +0000
commit781e1004f3eee23f946442b7829118a11212898c (patch)
treee7684f2fb95cd69baabcd6c4b5b7cddcd6583935 /gcc/fortran/resolve.c
parentedcd599b95b7d309f88bcd8de62c5e7bb50d861e (diff)
downloadgcc-781e1004f3eee23f946442b7829118a11212898c.zip
gcc-781e1004f3eee23f946442b7829118a11212898c.tar.gz
gcc-781e1004f3eee23f946442b7829118a11212898c.tar.bz2
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
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index d75704b..a4667b7 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -604,6 +604,12 @@ resolve_actual_arglist (gfc_actual_arglist * arg)
|| 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
parent) scope, then we really have a variable reference. */