Do not generate recursion check for compiler-generated procedures.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 29 Jun 2020 21:11:06 +0000 (23:11 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 29 Jun 2020 21:11:30 +0000 (23:11 +0200)
commit95cdcf701dad826f225d6413b59650f181954399
tree03f4708f939f322b199be542123f16d20d65da8c
parentace60939fd27271fe3b3e53621eca80c7357836c
Do not generate recursion check for compiler-generated procedures.

This one-line fix removes a check for recursion for procedures
which are compiler-generated, such as finalizers or deallocation.
These need to be recursive, even if the user code should not be.

gcc/fortran/ChangeLog:

PR fortran/95743
* trans-decl.c (gfc_generate_function_code): Do not generate
recursion check for compiler-generated procedures.
gcc/fortran/trans-decl.c
gcc/testsuite/gfortran.dg/recursive_check_16.f90 [new file with mode: 0644]