diff options
Diffstat (limited to 'gcc/fortran/class.c')
-rw-r--r-- | gcc/fortran/class.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index 3bb326c..9ef30f6 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -2707,15 +2707,17 @@ find_typebound_proc_uop (gfc_symbol* derived, gfc_try* t, gfc_symtree* res; gfc_symtree* root; - /* Set correct symbol-root. */ - gcc_assert (derived->f2k_derived); - root = (uop ? derived->f2k_derived->tb_uop_root - : derived->f2k_derived->tb_sym_root); - /* Set default to failure. */ if (t) *t = FAILURE; + if (derived->f2k_derived) + /* Set correct symbol-root. */ + root = (uop ? derived->f2k_derived->tb_uop_root + : derived->f2k_derived->tb_sym_root); + else + return NULL; + /* Try to find it in the current type's namespace. */ res = gfc_find_symtree (root, name); if (res && res->n.tb && !res->n.tb->error) |