2018-03-11 Paul Thomas <pault@gcc.gnu.org>
commit6f93d67b0fb4bd352c6151781392b8310ac7b078
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 11 Mar 2018 22:25:11 +0000 (11 22:25 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 11 Mar 2018 22:25:11 +0000 (11 22:25 +0000)
tree967c16a73c8b9dd9bc89ae8e0c84a1baf6462d69
parent824fa3c2c583e4e84720ab1bd769e6adc624bd24
2018-03-11  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/84546
* trans-array.c (structure_alloc_comps): Make sure that the
vptr is copied and that the unlimited polymorphic _len is used
to compute the size to be allocated.
* trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
unlimited polymorphic _len for the offset to the element.
(gfc_copy_class_to_class): Set the new 'unlimited' argument.
* trans.h : Add the boolean 'unlimited' to the prototype.

2018-03-11  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/84546
* gfortran.dg/unlimited_polymorphic_29.f90 : New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258438 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-expr.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/unlimited_polymorphic_29.f90 [new file with mode: 0644]