This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: RECURSIVE vs PURE and ELEMENTAL
On Fri, Aug 03, 2007 at 09:09:07PM -0700, Steve Kargl wrote:
>
> Thanks for the report. Can you run 'gfortran --version' and
> report the output?
>
> With no options, I get
> mobile:kargl[211] gfc4x -o z w.f90
> w.f90:26.8:
>
> r = factorial_inner (val * next, next - 1)
> 1
> Error: Function 'factorial_inner' at (1) cannot call itself, as it is
> not RECURSIVE
> mobile:kargl[212] gfc4x --version
> GNU Fortran (GCC) 4.3.0 20070802 (experimental)
>
If I change ELEMENTAL to RECURSIVE in the module. I get a
type/rank mismatch, which I think is the correct error.
--
Steve