re PR fortran/85742 (sizeof allocatable arrays returning wrong value)
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 13 May 2018 17:01:16 +0000 (17:01 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 13 May 2018 17:01:16 +0000 (17:01 +0000)
commitf094a21f31a0ada105b5c8e7fe85f05c225fd3f4
tree9da4b0c241f1ee86401dc99456230cdcccf0a722
parent798a67a4ce57b295d568a8548c0319258a805c23
re PR fortran/85742 (sizeof allocatable arrays returning wrong value)

2018-05-13  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/85742
* trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
of 'size'. If the element type is a pointer use the size of the
TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
case, set the size to zero.

2018-05-13  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/85742
* gfortran.dg/assumed_type_9.f90 : New test.

From-SVN: r260211
gcc/fortran/ChangeLog
gcc/fortran/trans-types.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/assumed_type_9.f90 [new file with mode: 0644]