https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91413
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> --- Currently, direct recursive use is still not permitted: Error: Function ‘faculty’ at (1) cannot be called recursively, as it is not RECURSIVE This has to be turned into "Error: Fortran 2018: ... without RECURSIVE". We also have to think about how to handle the -f(no-)automatic -frecursive etc. with this change. – As "SAVE" is also allowed in recursive functions, we just need to ensure that the old semantic stays the same and write a few more words to the documentation. Regarding -fmax-stack-var-size=n and -fstack-arrays, one also needs to should point out the implications regarding recursive use, possibly the effect of an explicit RECURSIVE and Fortran >= 2018. Regarding the stack to static handling: I think we currently also print the message if the user has explicitly given "NON_RECURSIVE" as the flag is currently binary (recursive - true/false) but it should keep track of (nonspecified, recursive, non_recursive).