[Patch, fortran] PR85742 sizeof allocatable arrays returning wrong value

Paul Richard Thomas paul.richard.thomas@gmail.com
Sun May 13 13:08:00 GMT 2018


I intend to apply this 'obvious' patch to trunk and 8-branch tonight,
unless there are any objections.

Bootstrapped and regetested on FC27/x86_64.

Paul

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 3014 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20180513/b61421b9/attachment.bin>


More information about the Fortran mailing list