Fixed as 'obvious' on trunk and 8-branch in revisions 264210 and 264213 respectively.
Paul 2018-09-11 Paul Thomas <pa...@gcc.gnu.org> PR fortran/87277 * expr.c (is_subref_array): Add the check of dimensionality for class, dummy, pointer arrays. 2018-09-11 Paul Thomas <pa...@gcc.gnu.org> PR fortran/87277 * gfortran.dg/select_type_43.f90: New test.