https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79072
--- Comment #14 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- The patch at https://gcc.gnu.org/ml/fortran/2017-11/msg00103.html fixes gfortran for the tests in comment 0, 5 and 11, but not for the test in comment 12: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have function_type in gfc_class_len_get, at fortran/trans-expr.c:226