aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/class.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2010-08-03 13:08:50 +0200
committerJanus Weil <janus@gcc.gnu.org>2010-08-03 13:08:50 +0200
commitaea18e926af4167682a3fda159647e001c660991 (patch)
treeb7729d1d740cd150207608722bafb1e916f855c5 /gcc/fortran/class.c
parent1890bccc84b42bf84137be7ffbc8a61bc8463046 (diff)
downloadgcc-aea18e926af4167682a3fda159647e001c660991.zip
gcc-aea18e926af4167682a3fda159647e001c660991.tar.gz
gcc-aea18e926af4167682a3fda159647e001c660991.tar.bz2
re PR fortran/44584 (Invalid memory access with gfortran.dg/typebound_proc_15.f03)
2010-08-03 Janus Weil <janus@gcc.gnu.org> PR fortran/44584 PR fortran/45161 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures. * resolve.c (resolve_tb_generic_targets): Check for errors. 2010-08-03 Janus Weil <janus@gcc.gnu.org> PR fortran/44584 PR fortran/45161 * gfortran.dg/typebound_call_9.f03: Modified. * gfortran.dg/typebound_generic_1.f03: Modified. From-SVN: r162840
Diffstat (limited to 'gcc/fortran/class.c')
-rw-r--r--gcc/fortran/class.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c
index 9393b56..558fda2 100644
--- a/gcc/fortran/class.c
+++ b/gcc/fortran/class.c
@@ -257,10 +257,8 @@ add_procs_to_declared_vtab1 (gfc_symtree *st, gfc_symbol *vtype)
if (st->right)
add_procs_to_declared_vtab1 (st->right, vtype);
- if (!st->n.tb)
- return;
-
- if (!st->n.tb->is_generic && st->n.tb->u.specific)
+ if (st->n.tb && !st->n.tb->error
+ && !st->n.tb->is_generic && st->n.tb->u.specific)
add_proc_comp (vtype, st->name, st->n.tb);
}