re PR fortran/58652 (ICE with move_alloc and unlimited polymorphic)
authorTobias Burnus <burnus@net-b.de>
Tue, 15 Oct 2013 06:14:35 +0000 (08:14 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Tue, 15 Oct 2013 06:14:35 +0000 (08:14 +0200)
2013-10-15  Tobias Burnus  <burnus@net-b.de>

        PR fortran/58652
        * trans-intrinsic.c (conv_intrinsic_move_alloc): Fix handling
        of CLASS(*) variables.

2013-10-15  Tobias Burnus  <burnus@net-b.de>

        PR fortran/58652
        * gfortran.dg/unlimited_polymorphic_11.f90: New.

From-SVN: r203586

gcc/fortran/ChangeLog
gcc/fortran/trans-intrinsic.c
gcc/testsuite/ChangeLog

index 0515e6c..83edb16 100644 (file)
@@ -1,3 +1,9 @@
+2013-10-15  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/58652
+       * trans-intrinsic.c (conv_intrinsic_move_alloc): Fix handling
+       of CLASS(*) variables.
+
 2013-10-14  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/58658
index 6b85b5b..7e2bb36 100644 (file)
@@ -7639,7 +7639,8 @@ conv_intrinsic_move_alloc (gfc_code *code)
                                  from_se.expr));
 
               /* Reset _vptr component to declared type.  */
-             if (UNLIMITED_POLY (from_expr))
+             if (vtab == NULL)
+               /* Unlimited polymorphic.  */
                gfc_add_modify_loc (input_location, &block, from_se.expr,
                                    fold_convert (TREE_TYPE (from_se.expr),
                                                  null_pointer_node));
@@ -7695,7 +7696,8 @@ conv_intrinsic_move_alloc (gfc_code *code)
                              from_se.expr));
 
          /* Reset _vptr component to declared type.  */
-         if (UNLIMITED_POLY (from_expr))
+         if (vtab == NULL)
+           /* Unlimited polymorphic.  */
            gfc_add_modify_loc (input_location, &block, from_se.expr,
                                fold_convert (TREE_TYPE (from_se.expr),
                                              null_pointer_node));
index e4dca4b..7fb88c5 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-15  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/58652
+       * gfortran.dg/unlimited_polymorphic_11.f90: New.
+
 2013-10-14  Ian Lance Taylor  <iant@google.com>
 
        * go.test/go-test.exp (go-find-packages): New proc.