trans-array.c (gfc_deallocate_scalar_with_status): Use NULL_TREE in the call to gfc_d...
authorTobias Burnus <burnus@gcc.gnu.org>
Sun, 9 Dec 2012 15:29:32 +0000 (16:29 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Sun, 9 Dec 2012 15:29:32 +0000 (16:29 +0100)
2012-12-09  Tobias Burnus  <burnus@net-b.de>

        * trans-array.c (gfc_deallocate_scalar_with_status): Use
        NULL_TREE in the call to gfc_deallocate_scalar_with_status.
        * trans-decl.c (gfc_trans_deferred_vars): Pass symbol.
        * trans-stmt.c (gfc_trans_deallocate): Pass polymorphic
        * variable.

From-SVN: r194332

gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-decl.c
gcc/fortran/trans-stmt.c

index 12d53eeb92646aebddfde7a3cdfb0b746f7a39e9..aa9eb9f6de78a97a37945e48837032f546ae095c 100644 (file)
@@ -1,7 +1,16 @@
+2012-12-09  Tobias Burnus  <burnus@net-b.de>
+
+       * trans-array.c (gfc_deallocate_scalar_with_status): Use
+       NULL_TREE in the call to gfc_deallocate_scalar_with_status.
+       * trans-decl.c (gfc_trans_deferred_vars): Pass symbol.
+       * trans-stmt.c (gfc_trans_deallocate): Pass polymorphic variable.
+
 2012-12-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/55593
-       * gfortran.dg/do_check_8.f90:  New test.
+       * frontend-passes.c (doloop_code):  Use resolved_sym
+       instead of n.sym->formal for formal argument list
+       to get the correct version for all generic subroutines. 
 
 2012-12-05  Tobias Burnus  <burnus@net-b.de>
 
index 24adfdeafbe71bb0726d4a5b1d5b327a6220265c..068989203690a1f73dc4a6fd91843661cd085f41 100644 (file)
@@ -7589,7 +7589,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl,
                                        CLASS_DATA (c)->attr.codimension);
              else
                {
-                 tmp = gfc_deallocate_scalar_with_status (comp, NULL, true, NULL,
+                 tmp = gfc_deallocate_scalar_with_status (comp, NULL_TREE, true, NULL,
                                                           CLASS_DATA (c)->ts);
                  gfc_add_expr_to_block (&tmpblock, tmp);
                  called_dealloc_with_status = true;
index 3bee1781d643a613a69b92b1c883245059a9222d..b23605058d0f5fb5a9966007bc93b75c46c66a64 100644 (file)
@@ -3780,9 +3780,10 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block)
                                                      NULL_TREE, true, NULL,
                                                      true);
                  else
-                   tmp = gfc_deallocate_scalar_with_status (se.expr, NULL,
-                                                            true, NULL,
-                                                            sym->ts);
+                   tmp = gfc_deallocate_scalar_with_status (se.expr, NULL_TREE,
+                                                  true,
+                                                  gfc_lval_expr_from_sym (sym),
+                                                  sym->ts);
                }
              if (sym->ts.type == BT_CLASS)
                {
index 79dc27d903be20cae18b253696c374cf3b51e2ec..6fe8b778e65d0290c0cbddcdf1b77e31678bc75d 100644 (file)
@@ -5380,7 +5380,7 @@ gfc_trans_deallocate (gfc_code *code)
       else
        {
          tmp = gfc_deallocate_scalar_with_status (se.expr, pstat, false,
-                                                  expr, expr->ts);
+                                                  al->expr, al->expr->ts);
          gfc_add_expr_to_block (&se.pre, tmp);
 
          /* Set to zero after deallocation.  */