re PR fortran/47180 ([OOP] EXTENDS_TYPE_OF returns the wrong result for disassociated polymorphic pointers)

2011-01-05  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/47180
	* trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
	'vtab' is initialized).

From-SVN: r168526
This commit is contained in:
Janus Weil 2011-01-05 20:14:56 +01:00
parent dc242c4a72
commit a29f38ce07
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2011-01-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/47180
* trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
'vtab' is initialized).
2011-01-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/47180

View file

@ -6121,7 +6121,7 @@ gfc_trans_class_assign (gfc_expr *expr1, gfc_expr *expr2, gfc_exec_op op)
if (expr2->ts.type != BT_CLASS)
{
/* Insert an additional assignment which sets the '_vptr' field. */
gfc_symbol *vtab;
gfc_symbol *vtab = NULL;
gfc_symtree *st;
lhs = gfc_copy_expr (expr1);