OSDN Git Service

2009-04-28 Paul Thomas <pault@gcc.gnu.org>
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Apr 2009 05:29:44 +0000 (05:29 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Apr 2009 05:29:44 +0000 (05:29 +0000)
PR fortran/39879
* trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
type parentheses argument if it is a variable with allocatable
components.

2009-04-28  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/39879
* gfortran.dg/alloc_comp_assign_10.f90: New test.

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

gcc/fortran/trans-expr.c

index 77a2dfa..a541a79 100644 (file)
@@ -1119,8 +1119,7 @@ gfc_conv_string_tmp (gfc_se * se, tree type, tree len)
       gfc_add_modify (&se->pre, var, tmp);
 
       /* Free the temporary afterwards.  */
-      tmp = gfc_call_free (var, true, &gfc_current_locus,
-                          ALLOCTYPE_TEMPORARY);
+      tmp = gfc_call_free (convert (pvoid_type_node, var));
       gfc_add_expr_to_block (&se->post, tmp);
     }