2018-01-08 Paul Thomas <pault@gcc.gnu.org>
commit8534bf8a8950afb987c8dd4cc6cfc16ddd040dbc
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Jan 2018 11:20:33 +0000 (8 11:20 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Jan 2018 11:20:33 +0000 (8 11:20 +0000)
tree0a0943697205f58503baa1da74a60f0afcde7e67
parentf03b63ff8dd157de68103ebcf157a3e05be6d065
2018-01-08  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/83611
* decl.c (gfc_get_pdt_instance): If parameterized arrays have
an initializer, convert the kind parameters and add to the
component if the instance.
* trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
for parameterized arrays. Clean up typos in comments. Convert
parameterized array initializers and copy into the array.
* trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
parameterized types.
*trans-stmt.c (trans_associate_var): Deallocate associate vars
as necessary, when they are PDT function results for example.

PR fortran/83731
* trans-array.c (structure_alloc_comps): Only compare len parms
when they are declared explicitly.

2018-01-08  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/83611
* gfortran.dg/pdt_15.f03 : Bump count of 'n.data = 0B' to 8.
* gfortran.dg/pdt_26.f03 : Bump count of '_malloc' to 9.
* gfortran.dg/pdt_27.f03 : New test.

PR fortran/83731
* gfortran.dg/pdt_28.f03 : New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256335 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/trans-array.c
gcc/fortran/trans-expr.c
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pdt_15.f03
gcc/testsuite/gfortran.dg/pdt_26.f03
gcc/testsuite/gfortran.dg/pdt_27.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pdt_28.f03 [new file with mode: 0644]