diff options
Diffstat (limited to 'gcc/fortran/class.c')
-rw-r--r-- | gcc/fortran/class.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index 3f23556..8a1f43f 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -911,6 +911,9 @@ finalize_component (gfc_expr *expr, gfc_symbol *derived, gfc_component *comp, if (!comp_is_finalizable (comp)) return; + if (comp->finalized) + return; + e = gfc_copy_expr (expr); if (!e->ref) e->ref = ref = gfc_get_ref (); @@ -1038,6 +1041,7 @@ finalize_component (gfc_expr *expr, gfc_symbol *derived, gfc_component *comp, sub_ns); gfc_free_expr (e); } + comp->finalized = true; } |