re PR fortran/59678 ([F03] Segfault on equalizing variables of a complex derived...
authorAndre Vehreschild <vehre@gmx.de>
Mon, 27 Apr 2015 17:34:11 +0000 (19:34 +0200)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Mon, 27 Apr 2015 17:34:11 +0000 (19:34 +0200)
commitfc7d0afb9c70f466189c433962bab41a84765b0f
tree8a4260da5d8939c246372d739e6e13568877622d
parent16d710b164529c81929bcb8bb55eea1b758b070e
re PR fortran/59678 ([F03] Segfault on equalizing variables of a complex derived type)

gcc/fortran
2015-04-27  Andre Vehreschild  <vehre@gmx.de>

        PR fortran/59678
        PR fortran/65841
        * trans-array.c (duplicate_allocatable): Fixed deep copy of
        allocatable components, which are liable for copy only, when
        they are allocated.
        (gfc_duplicate_allocatable): Add deep-copy code into if
        component allocated block. Needed interface change for that.
        (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
        add into if-block for checking whether a component was
        allocated.
        (gfc_duplicate_allocatable_nocopy): Likewise.
        (structure_alloc_comps): Likewise.
        * trans-array.h: Likewise.
        * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
        * trans-openmp.c (gfc_walk_alloc_comps): Likewise.

gcc/testsuite
2015-04-27  Andre Vehreschild  <vehre@gmx.de>

        PR fortran/59678
        PR fortran/65841
        * gfortran.dg/alloc_comp_deep_copy_1.f03: New test.
        * gfortran.dg/alloc_comp_deep_copy_2.f03: New test.

From-SVN: r222477
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-array.h
gcc/fortran/trans-expr.c
gcc/fortran/trans-openmp.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/alloc_comp_deep_copy_1.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/alloc_comp_deep_copy_2.f03 [new file with mode: 0644]