diff options
author | Janus Weil <janus@gcc.gnu.org> | 2010-10-07 19:35:18 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2010-10-07 19:35:18 +0200 |
commit | 061e60bd787049355aa67c3370fa2a8a7998f478 (patch) | |
tree | 48ab1d27fc9e1798d4f9be4fed1d31f4fda9dd33 /gcc/fortran/resolve.c | |
parent | 3cfa8f8272176e74a0a8ac2075a3d55046a44652 (diff) | |
download | gcc-061e60bd787049355aa67c3370fa2a8a7998f478.zip gcc-061e60bd787049355aa67c3370fa2a8a7998f478.tar.gz gcc-061e60bd787049355aa67c3370fa2a8a7998f478.tar.bz2 |
re PR fortran/45933 ([OOP] ICE in gfc_add_component_ref, at fortran/class.c:77)
2010-10-07 Janus Weil <janus@gcc.gnu.org>
PR fortran/45933
* resolve.c (resolve_typebound_function): Use correct declared type
for type-bound operators.
2010-10-07 Janus Weil <janus@gcc.gnu.org>
PR fortran/45933
* gfortran.dg/typebound_operator_5.f03: New.
From-SVN: r165126
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 526e6df..a5aa62a 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -5719,13 +5719,12 @@ resolve_typebound_function (gfc_expr* e) /* Deal with typebound operators for CLASS objects. */ expr = e->value.compcall.base_object; - if (expr && expr->symtree->n.sym->ts.type == BT_CLASS - && e->value.compcall.name) + if (expr && expr->ts.type == BT_CLASS && e->value.compcall.name) { /* Since the typebound operators are generic, we have to ensure that any delays in resolution are corrected and that the vtab is present. */ - ts = expr->symtree->n.sym->ts; + ts = expr->ts; declared = ts.u.derived; c = gfc_find_component (declared, "$vptr", true, true); if (c->ts.u.derived == NULL) |