aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2010-01-14 06:17:38 +0000
committerPaul Thomas <pault@gcc.gnu.org>2010-01-14 06:17:38 +0000
commit40c3294835c9e8e416c0eae4688c1160ffc8ad3f (patch)
tree00205ae58b6e5ce1f062de0463815660141dcdc6 /gcc/gcc.c
parent08b02036337225eb9b58497c704efaa2b41918bc (diff)
downloadgcc-40c3294835c9e8e416c0eae4688c1160ffc8ad3f.zip
gcc-40c3294835c9e8e416c0eae4688c1160ffc8ad3f.tar.gz
gcc-40c3294835c9e8e416c0eae4688c1160ffc8ad3f.tar.bz2
re PR fortran/41478 (Corrupted memory using PACK for derived-types with allocated components)
2010-01-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/41478 * trans-array.c (duplicate_allocatable): Static version of gfc_duplicate_allocatable with provision to handle scalar components. New boolean argument to switch off call to malloc if true. (gfc_duplicate_allocatable): New function to call above with new argument false. (gfc_copy_allocatable_data): New function to call above with new argument true. (structure_alloc_comps): Do not apply indirect reference to scalar pointers. Add new section to copy allocatable components of arrays. Extend copying of allocatable components to include scalars. (gfc_copy_only_alloc_comp): New function to copy allocatable component derived types, without allocating the base structure. * trans-array.h : Add primitive for gfc_copy_allocatable_data. Add primitive for gfc_copy_only_alloc_comp. * trans-expr.c (gfc_conv_procedure_call): After calls to transformational functions with results that are derived types with allocatable components, copy the components in the result. (gfc_trans_arrayfunc_assign): Deallocate allocatable components of lhs derived types before allocation. 2010-01-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/41478 * gfortran.dg/alloc_comp_scalar_1.f90: New test. * gfortran.dg/alloc_comp_transformational_1.f90: New test. From-SVN: r155877
Diffstat (limited to 'gcc/gcc.c')
0 files changed, 0 insertions, 0 deletions