This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47517] [F03] Reallocate on assignment: Segfault
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Feb 2013 22:33:19 +0000
- Subject: [Bug fortran/47517] [F03] Reallocate on assignment: Segfault
- Auto-submitted: auto-generated
- References: <bug-47517-4@http.gcc.gnu.org/bugzilla/>
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