[Bug fortran/89363] RANK incorrect for unallocated allocatable
pault at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 12 13:41:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89363
--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Tue Mar 12 13:40:51 2019
New Revision: 269612
URL: https://gcc.gnu.org/viewcvs?rev=269612&root=gcc&view=rev
Log:
2019-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89363
PR fortran/89364
* trans-expr.c (set_dtype_for_unallocated): New function.
(gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
pointer arguments.
(gfc_conv_procedure_call): Likewise. Also, set the ubound of
the final dimension to -1 for assumed rank formal args that are
associated with assumed size arrays.
* trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
the final dimension of assumed rank entities that are argument
associated with assumed size arrays.
(gfc_conv_intrinsic_shape): Likewise return -1 for the final
dimension of the shape intrinsic.
2019-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89363
* gfortran.dg/assumed_rank_16.f90: New test.
PR fortran/89364
* gfortran.dg/assumed_rank_17.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/assumed_rank_16.f90
trunk/gcc/testsuite/gfortran.dg/assumed_rank_17.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list