Commit a29f38ce by Janus Weil

re PR fortran/47180 ([OOP] EXTENDS_TYPE_OF returns the wrong result for…

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
parent dc242c4a
2011-01-05 Janus Weil <janus@gcc.gnu.org> 2011-01-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/47180 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
* trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
assignment, set the _vptr component to the declared type. assignment, set the _vptr component to the declared type.
......
...@@ -6121,7 +6121,7 @@ gfc_trans_class_assign (gfc_expr *expr1, gfc_expr *expr2, gfc_exec_op op) ...@@ -6121,7 +6121,7 @@ gfc_trans_class_assign (gfc_expr *expr1, gfc_expr *expr2, gfc_exec_op op)
if (expr2->ts.type != BT_CLASS) if (expr2->ts.type != BT_CLASS)
{ {
/* Insert an additional assignment which sets the '_vptr' field. */ /* Insert an additional assignment which sets the '_vptr' field. */
gfc_symbol *vtab; gfc_symbol *vtab = NULL;
gfc_symtree *st; gfc_symtree *st;
lhs = gfc_copy_expr (expr1); lhs = gfc_copy_expr (expr1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment