diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-05 18:14:52 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-05 18:14:52 +0000 |
commit | a97292cbd2f2b490217b65c95febb811b9bb6c01 (patch) | |
tree | db3c9509cd58e015bc566f15340f5dd30d33b1b0 /gcc/fortran/expr.c | |
parent | 46c5c275b6cc21590af9b09851a1802dda5ab99d (diff) | |
download | gcc-a97292cbd2f2b490217b65c95febb811b9bb6c01.tar.gz |
2010-11-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/45451
PR fortran/46174
* class.c (gfc_find_derived_vtab): Improved search for existing vtab.
Add component '$copy' to vtype symbol for polymorphic deep copying.
* expr.c (gfc_check_pointer_assign): Make sure the vtab is generated
during resolution stage.
* resolve.c (resolve_codes): Don't resolve code if namespace is already
resolved.
* trans-stmt.c (gfc_trans_allocate): Call '$copy' procedure for
polymorphic ALLOCATE statements with SOURCE.
2010-11-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/45451
PR fortran/46174
* gfortran.dg/class_19.f03: Modified.
* gfortran.dg/class_allocate_6.f03: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 8dfbf7393d3..2b98b35ee21 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3457,6 +3457,10 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) return FAILURE; } + if (lvalue->ts.type == BT_CLASS && rvalue->ts.type == BT_DERIVED) + /* Make sure the vtab is present. */ + gfc_find_derived_vtab (rvalue->ts.u.derived); + /* Check rank remapping. */ if (rank_remap) { |