From b53abf71d275c3642dd65d4fdc98a0270fc5ee3c Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Fri, 17 Jun 2011 22:03:04 +0200 Subject: re PR fortran/48699 ([OOP] MOVE_ALLOC inside SELECT TYPE) 2011-06-17 Janus Weil PR fortran/48699 * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic, make sure the vtab is present. 2011-06-17 Janus Weil PR fortran/48699 * gfortran.dg/move_alloc_5.f90: New. From-SVN: r175151 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/check.c | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e042821..d7c5981 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-06-17 Janus Weil + + PR fortran/48699 + * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic, + make sure the vtab is present. + 2011-06-16 Janus Weil PR fortran/49074 diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 1178967..972b290 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -2672,6 +2672,10 @@ gfc_check_move_alloc (gfc_expr *from, gfc_expr *to) return FAILURE; } + /* CLASS arguments: Make sure the vtab is present. */ + if (to->ts.type == BT_CLASS) + gfc_find_derived_vtab (from->ts.u.derived); + return SUCCESS; } -- cgit v1.1