aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2016-11-09 18:22:02 +0100
committerJanus Weil <janus@gcc.gnu.org>2016-11-09 18:22:02 +0100
commitb349a81aa03c74c0d39fb5ac847c308ab63be76e (patch)
tree32a1321fa05b9167e353ebb55bc85f5f3ffe838d /gcc/fortran/expr.c
parent4f3535815e039b0593297e17ce03715b6afa93b1 (diff)
downloadgcc-b349a81aa03c74c0d39fb5ac847c308ab63be76e.zip
gcc-b349a81aa03c74c0d39fb5ac847c308ab63be76e.tar.gz
gcc-b349a81aa03c74c0d39fb5ac847c308ab63be76e.tar.bz2
[multiple changes]
2016-11-09 Steve Kargl <kargl@gcc.gnu.org> Janus Weil <janus@gcc.gnu.org> PR fortran/60777 * expr.c (external_spec_function): Allow recursive specification functions in F03. 2016-11-09 Janus Weil <janus@gcc.gnu.org> PR fortran/60777 * gfortran.dg/spec_expr_7.f90: New test. From-SVN: r242009
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index b2ffaae..e2d1311 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -2794,12 +2794,12 @@ external_spec_function (gfc_expr *e)
return false;
}
- if (f->attr.recursive)
- {
- gfc_error ("Specification function %qs at %L cannot be RECURSIVE",
- f->name, &e->where);
+ /* F08:7.1.11.6. */
+ if (f->attr.recursive
+ && !gfc_notify_std (GFC_STD_F2003,
+ "Specification function '%s' "
+ "at %L cannot be RECURSIVE", f->name, &e->where))
return false;
- }
function_allowed:
return restricted_args (e->value.function.actual);