[Bug fortran/83731] PDT length parameter incorrectly rejected at run-time with -fcheck=bounds
pault at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 8 11:21:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83731
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Mon Jan 8 11:20:33 2018
New Revision: 256335
URL: https://gcc.gnu.org/viewcvs?rev=256335&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/gfortran.dg/pdt_27.f03
trunk/gcc/testsuite/gfortran.dg/pdt_28.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/pdt_15.f03
trunk/gcc/testsuite/gfortran.dg/pdt_26.f03
More information about the Gcc-bugs
mailing list