diff options
author | Janus Weil <janus@gcc.gnu.org> | 2010-08-04 21:49:19 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2010-08-04 21:49:19 +0200 |
commit | e10f52d09976c17ebd5fadeb4a0e09a854d3814d (patch) | |
tree | 3fa3d8617306adc01c4a2d8af8ed81aff29cc0a0 /gcc/fortran/interface.c | |
parent | 0e884a9464e6941b5fef6b08fdcebee368799c73 (diff) | |
download | gcc-e10f52d09976c17ebd5fadeb4a0e09a854d3814d.zip gcc-e10f52d09976c17ebd5fadeb4a0e09a854d3814d.tar.gz gcc-e10f52d09976c17ebd5fadeb4a0e09a854d3814d.tar.bz2 |
re PR fortran/42207 ([OOP] Compile-time errors on typed allocation and pointer function result assignment)
2010-08-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/42207
PR fortran/44064
PR fortran/44065
* class.c (gfc_find_derived_vtab): Do not generate vtabs for class
container types. Do not artificially increase refs. Commit symbols one
by one.
* interface.c (compare_parameter): Make sure vtabs are present before
generating module variables.
* resolve.c (resolve_allocate_expr): Ditto.
2010-08-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/42207
PR fortran/44064
PR fortran/44065
* gfortran.dg/class_25.f03: New.
* gfortran.dg/class_26.f03: New.
From-SVN: r162879
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 4ffe5ee..f37f1bd 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1423,6 +1423,11 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, && actual->ts.u.derived && actual->ts.u.derived->ts.is_iso_c) return 1; + if (formal->ts.type == BT_CLASS) + /* Make sure the vtab symbol is present when + the module variables are generated. */ + gfc_find_derived_vtab (formal->ts.u.derived); + if (actual->ts.type == BT_PROCEDURE) { char err[200]; |