diff options
author | Janus Weil <janus@gcc.gnu.org> | 2010-08-29 23:29:38 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2010-08-29 23:29:38 +0200 |
commit | bd48f123900b0abd449d22ec51b7c6decd9c6983 (patch) | |
tree | 9d85f2b8035f657e325734fda48182ef05b441ce /gcc/fortran | |
parent | 33620355cd432b0e3983d3740c5d64340e9fac93 (diff) | |
download | gcc-bd48f123900b0abd449d22ec51b7c6decd9c6983.zip gcc-bd48f123900b0abd449d22ec51b7c6decd9c6983.tar.gz gcc-bd48f123900b0abd449d22ec51b7c6decd9c6983.tar.bz2 |
re PR fortran/42769 ([OOP] ICE in resolve_typebound_procedure)
2010-08-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42769
* resolve.c (resolve_structure_cons): For derived types, make sure the
type has been resolved.
(resolve_typebound_procedures): Make sure the vtab has been generated.
2010-08-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42769
* gfortran.dg/dynamic_dispatch_11.f03: New.
From-SVN: r163631
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 8 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9dab697..c91663f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,10 +1,17 @@ 2010-08-29 Janus Weil <janus@gcc.gnu.org> + PR fortran/42769 + * resolve.c (resolve_structure_cons): For derived types, make sure the + type has been resolved. + (resolve_typebound_procedures): Make sure the vtab has been generated. + +2010-08-29 Janus Weil <janus@gcc.gnu.org> + PR fortran/45439 * match.c (gfc_match_select_type): Give the associate-name the FL_VARIABLE attribute. -2010-07-28 Steven G. Kargl <kargl@gcc.gnu.org> +2010-08-28 Steven G. Kargl <kargl@gcc.gnu.org> * simplify.c (gfc_simplify_bessel_n2): Fix indention and argument type. diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 68faf8b..b9fea23 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -930,6 +930,10 @@ resolve_structure_cons (gfc_expr *expr, int init) symbol_attribute a; t = SUCCESS; + + if (expr->ts.type == BT_DERIVED) + resolve_symbol (expr->ts.u.derived); + cons = gfc_constructor_first (expr->value.constructor); /* A constructor may have references if it is the result of substituting a parameter variable. In this case we just pull out the component we @@ -11039,6 +11043,7 @@ error: stree->n.tb->error = 1; } + static gfc_try resolve_typebound_procedures (gfc_symbol* derived) { @@ -11050,6 +11055,9 @@ resolve_typebound_procedures (gfc_symbol* derived) resolve_bindings_derived = derived; resolve_bindings_result = SUCCESS; + /* Make sure the vtab has been generated. */ + gfc_find_derived_vtab (derived); + if (derived->f2k_derived->tb_sym_root) gfc_traverse_symtree (derived->f2k_derived->tb_sym_root, &resolve_typebound_procedure); |