diff options
Diffstat (limited to 'gcc/fortran/interface.cc')
-rw-r--r-- | gcc/fortran/interface.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/interface.cc b/gcc/fortran/interface.cc index f74fbf0..d08f683 100644 --- a/gcc/fortran/interface.cc +++ b/gcc/fortran/interface.cc @@ -4781,6 +4781,13 @@ matching_typebound_op (gfc_expr** tb_base, gfc_actual_arglist* argcopy; bool matches; + /* If expression matching comes here during parsing, eg. when + parsing ASSOCIATE, generic TBPs have not yet been resolved + and g->specific will not have been set. Wait for expression + resolution by returning NULL. */ + if (!g->specific && !gfc_current_ns->resolved) + return NULL; + gcc_assert (g->specific); if (g->specific->error) continue; |