https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85742
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> --- Author: pault Date: Sun May 13 18:07:54 2018 New Revision: 260215 URL: https://gcc.gnu.org/viewcvs?rev=260215&root=gcc&view=rev Log: 2018-05-13 Paul Thomas <pa...@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 <pa...@gcc.gnu.org> PR fortran/85742 * gfortran.dg/assumed_type_9.f90 : New test. Added: branches/gcc-8-branch/gcc/testsuite/gfortran.dg/assumed_type_9.f90 Modified: branches/gcc-8-branch/gcc/fortran/ChangeLog branches/gcc-8-branch/gcc/fortran/trans-types.c branches/gcc-8-branch/gcc/testsuite/ChangeLog