This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66035] [5/6 Regression] gfortran ICE segfault
- From: "vehre at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 17 Jul 2015 10:16:53 +0000
- Subject: [Bug fortran/66035] [5/6 Regression] gfortran ICE segfault
- Auto-submitted: auto-generated
- References: <bug-66035-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66035
--- Comment #6 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Fri Jul 17 10:16:21 2015
New Revision: 225928
URL: https://gcc.gnu.org/viewcvs?rev=225928&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:
2015-07-17 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/66035
* trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
Compute the size to allocate for class and derived type objects
correclty.
(gfc_trans_subcomponent_assign): Only allocate memory for a
component when the object to assign is not an allocatable class
object (the memory is already present for allocatable class objects).
Furthermore use copy_class_to_class for assigning the rhs to the
component (may happen for dummy class objects on the rhs).
gcc/testsuite/ChangeLog:
2015-07-17 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/66035
* gfortran.dg/structure_constructor_13.f03: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/structure_constructor_13.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog