aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2009-04-28 05:29:44 +0000
committerPaul Thomas <pault@gcc.gnu.org>2009-04-28 05:29:44 +0000
commit297c37173212c85e2e0c61cb9a1fd89fa9d44f25 (patch)
tree4d51ca87e6dcb5e942426982d9b3294b23b6ba85 /gcc
parent7d44f531817fdd9165fbbbdf579225164aa8ae51 (diff)
downloadgcc-297c37173212c85e2e0c61cb9a1fd89fa9d44f25.zip
gcc-297c37173212c85e2e0c61cb9a1fd89fa9d44f25.tar.gz
gcc-297c37173212c85e2e0c61cb9a1fd89fa9d44f25.tar.bz2
re PR fortran/39879 (double free or corruption abort with gfortran)
2009-04-28 Paul Thomas <pault@gcc.gnu.org> 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. From-SVN: r146872
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/trans-expr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 77a2dfa..a541a79 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -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);
}