diff options
author | Janus Weil <janus@gcc.gnu.org> | 2013-01-16 20:52:10 +0100 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2013-01-16 20:52:10 +0100 |
commit | 9b940c6dd781581de1493d658182be58d2b4a93d (patch) | |
tree | 673b77c76d912d5d5c6e4e782f2fdb2ca81aca2b /gcc/fortran/class.c | |
parent | 934144c03c96b4f8e487ddbc2a473d6da71379c8 (diff) | |
download | gcc-9b940c6dd781581de1493d658182be58d2b4a93d.zip gcc-9b940c6dd781581de1493d658182be58d2b4a93d.tar.gz gcc-9b940c6dd781581de1493d658182be58d2b4a93d.tar.bz2 |
re PR fortran/55983 (ICE in find_typebound_proc_uop, at fortran/class.c:2711)
2013-01-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/55983
* class.c (find_typebound_proc_uop): Check for f2k_derived instead of
asserting it.
2013-01-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/55983
* gfortran.dg/class_55.f90: New.
From-SVN: r195251
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) |