[Bug fortran/59678] [F03] Segfault on equalizing variables of a complex derived type

vehre at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 27 17:34:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59678

--- Comment #17 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Mon Apr 27 17:34:11 2015
New Revision: 222477

URL: https://gcc.gnu.org/viewcvs?rev=222477&root=gcc&view=rev
Log:
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.


Added:
    trunk/gcc/testsuite/gfortran.dg/alloc_comp_deep_copy_1.f03
    trunk/gcc/testsuite/gfortran.dg/alloc_comp_deep_copy_2.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-array.h
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-openmp.c
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-bugs mailing list