2015-02-05 Paul Thomas <pault@gcc.gnu.org>
commit0b373205f7bca4702ee464e0d42c99ff96eb1a78
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 Feb 2015 08:02:58 +0000 (5 08:02 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 Feb 2015 08:02:58 +0000 (5 08:02 +0000)
tree460ab48d46937485d07108170047c95303e18d38
parentf1f488f7a68191cc93e38fc1ea4360bd34da1c7b
2015-02-05  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/640757
* resolve.c (resolve_structure_cons): Obtain the rank of class
components.
* trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
assignment to allocatable class array components.
(alloc_scalar_allocatable_for_subcomponent_assignment): If comp
is a class component, allocate to the _data field.
(gfc_trans_subcomponent_assign): If a class component with a
derived type expression set the _vptr field and for array
components, call gfc_trans_alloc_subarray_assign. For scalars,
the assignment is performed here.

2015-02-05  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/640757
* gfortran.dg/type_to_class_2.f90: New test
* gfortran.dg/type_to_class_3.f90: New test

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220435 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/type_to_class_2.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/type_to_class_3.f03 [new file with mode: 0644]