This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/47517] [F03] Reallocate on assignment: Segfault


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47517

--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> 2013-02-04 22:33:19 UTC ---
Author: pault
Date: Mon Feb  4 22:33:15 2013
New Revision: 195741

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195741
Log:
2013-02-04  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/56008
    PR fortran/47517
    * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
    the lhs descriptor before it is modified for reallocation. Use
    it to deallocate allocatable components in the reallocation
    block.  Nullify allocatable components for newly (re)allocated
    arrays.

2013-02-04  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/56008
    * gfortran.dg/realloc_on _assign_16.f90 : New test.

    PR fortran/47517
    * gfortran.dg/realloc_on _assign_17.f90 : New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/realloc_on_assign_16.f90
    trunk/gcc/testsuite/gfortran.dg/realloc_on_assign_17.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]