F2018 and recursive procedures
Paul Richard Thomas
paul.richard.thomas@gmail.com
Mon Dec 18 11:11:00 GMT 2017
Hi Janne,
> So for -std=f2018 (and thus also -std=gnu) the behavior must be
> changed so that -frecursive is the default. However, I think we should
> go a step further and get rid of -frecursive and -fmax-stack-var-size.
> Or to be specific, do nothing for -frecursive, and print a warning
> message saying that they no longer have any effect for -fno-recursive
> and -fmax-stack-var-size. I'm not proposing to change -fno-automatic
> in any way.
Yes to all of those. I suggest though that the options be retained for
standards earlier than F2018. It will mean a bit more work but it
does, at least, give users the possibility of retaining all their
favourite options.
>
> Alternatively, one could modify -fmax-stack-var-size to work like the
> -heap-arrays option in Intel Fortran, that is, allocate variables
> larger than the size limit on the heap rather than in static memory.
> Personally, I'm not really fond of that; if the user wants to allocate
> on the heap she/he should use allocatable variables and not magic
> compiler switches.
I agree.
>
> As for NON_RECURSIVE, I propose that it should not affect placing of
> automatic variables, just generate an error if we detect at compile
> time that it's being called recursively. So viewing it this way it
> would be more a documentation feature than something which would
> affect code generation.
Fine by me.
Cheers
Paul
More information about the Fortran
mailing list