aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2010-09-16 15:12:59 +0200
committerJanus Weil <janus@gcc.gnu.org>2010-09-16 15:12:59 +0200
commit7d58b9e77aab0f4c8cd8f6eb4dc618b240325099 (patch)
tree435a44ae62bf4f462d5ee511ab9e305693e9e1bb /gcc/fortran/interface.c
parentf941c3e2122d574412d351c69ddb634c2260683d (diff)
downloadgcc-7d58b9e77aab0f4c8cd8f6eb4dc618b240325099.zip
gcc-7d58b9e77aab0f4c8cd8f6eb4dc618b240325099.tar.gz
gcc-7d58b9e77aab0f4c8cd8f6eb4dc618b240325099.tar.bz2
re PR fortran/45674 ([OOP] Undefined references for extended types)
2010-09-16 Janus Weil <janus@gcc.gnu.org> PR fortran/45674 * interface.c (compare_parameter): Create vtab for actual argument, instead of formal (if needed). 2010-09-16 Janus Weil <janus@gcc.gnu.org> PR fortran/45674 * gfortran.dg/class_dummy_2.f03: New. From-SVN: r164338
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index e9d310a..044ccd6 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1428,10 +1428,10 @@ 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)
+ if (formal->ts.type == BT_CLASS && actual->ts.type == BT_DERIVED)
/* Make sure the vtab symbol is present when
the module variables are generated. */
- gfc_find_derived_vtab (formal->ts.u.derived);
+ gfc_find_derived_vtab (actual->ts.u.derived);
if (actual->ts.type == BT_PROCEDURE)
{