This is the mail archive of the
mailing list for the GCC project.
Re: [gfortran] restrictions on recursive procedures
- From: Paul Thomas <paulthomas2 at wanadoo dot fr>
- To: François-Xavier Coudert <fxcoudert at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, GFortran <fortran at gcc dot gnu dot org>
- Date: Wed, 10 May 2006 23:20:20 +0200
- Subject: Re: [gfortran] restrictions on recursive procedures
- References: <firstname.lastname@example.org>
I missed the fact that this is a patch; it has neither "patch" in the
title nor a PR. The only reason that I found it was that I had the PR
marked to do myself!
I just applied it to my tree and will do the regtesting, whilst in the
land of Nod. From a very quick look, it seemed OK. I would suggest
revamping it slightly(untested!), as follows:
if (expr->value.function.esym &&
gfc_symbol *esym, *proc;
esym = expr->value.function.esym;
proc = gfc_current_ns->proc_name;
if (esym == proc)
gfc_error ("Function '%s' at %L cannot call itself, as it is not "
"RECURSIVE", name, &expr->where);
t = FAILURE;
&& esym->ns->entries->sym == proc->ns->entries->sym)
gfc_error ("Call to ENTRY '%s' at %L is recursive, but function "
"'%s' is not declared as RECURSIVE",
t = FAILURE;
+ ibid for the subroutines. You need to cycle through the entries in the
second block do you not?
Anyway, I will review it properly tomorrow and will come back to you then.