On 1/16/20 3:47 PM, Mark Eggleston wrote:
Please find attached patch to fix this regression.
OK for master and 9 branch?

OK for both – thanks!

As note to others:

* Up to Fortran 2008, 'recursive' attribute is required if a proc is recursively used; since Fortran 2018 recursive is the default (and the non_recursive attribute exists as well). For this patch (and the near future), we mostly ignore this bit of F2018. See also PR91413.

* The PR is about a vendor extension – cf. test case pr93263_1.f90. The second test case should be standard conforming and ensures that neither this patch (nor a future patch) breaks it. [Namely, static memory is indeed used as requested.]

Thanks,

Tobias

Change logs:
gcc/fortran

    Mark Eggleston  <mark.eggles...@codethink.com>

    PR fortran/93236
    * resolve.c (resolve_types): Declare boolean recursive and set with the
    value of the recursive attribute of namespace proc_name symbol
    structure if it exists.  Call gfc_save_all if both flag_automatic and
    recursive are false or ns->save_all is true.

gcc/testsuite

    Mark Eggleston  <mark.eggles...@codethink.com>
    Tobias Burnus  <bur...@gcc.gnu.org>

    * gfortran.dg/pr93263_1.f90: New test.
    * gfortran.dg/pr93263_2.f90: New test.

Reply via email to