diff options
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index e31ecbd5909..8cbcac93dab 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -5741,6 +5741,19 @@ resolve_fl_derived (gfc_symbol *sym) sym->ns->derived_types = dt_list; } + /* Add derived type to the derived type list. */ + for (dt_list = sym->ns->derived_types; dt_list; dt_list = dt_list->next) + if (sym == dt_list->derived) + break; + + if (dt_list == NULL) + { + dt_list = gfc_get_dt_list (); + dt_list->next = sym->ns->derived_types; + dt_list->derived = sym; + sym->ns->derived_types = dt_list; + } + return SUCCESS; } |