OSDN Git Service

2011-01-05 Janus Weil <janus@gcc.gnu.org>
authorjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Jan 2011 19:14:56 +0000 (19:14 +0000)
committerjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Jan 2011 19:14:56 +0000 (19:14 +0000)
PR fortran/47180
* trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
'vtab' is initialized).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168526 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c

index b7f5afe..d00b9ed 100644 (file)
@@ -1,6 +1,12 @@
 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
        * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
        assignment, set the _vptr component to the declared type.
 
index fa58376..68eb1aa 100644 (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);