[Bug fortran/80361] [5/6/7 Regression] bogus recursive call to nonrecursive procedure with -fcheck=recursion
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 12 19:01:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80361
--- Comment #16 from janus at gcc dot gnu.org ---
This seems to be sufficient to fix the runtime error on the reduced test case
in comment #13:
Index: gcc/fortran/class.c
===================================================================
--- gcc/fortran/class.c (revision 246822)
+++ gcc/fortran/class.c (working copy)
@@ -1613,6 +1613,7 @@ generate_finalization_wrapper (gfc_symbol *derived
final->attr.flavor = FL_PROCEDURE;
final->attr.function = 1;
final->attr.pure = 0;
+ final->attr.recursive = 1;
final->result = final;
final->ts.type = BT_INTEGER;
final->ts.kind = 4;
More information about the Gcc-bugs
mailing list