https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86830
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |janus at gcc dot gnu.org Target Milestone|--- |8.3 --- Comment #2 from janus at gcc dot gnu.org --- This draft patch fixes the problem: diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index c5bf822cd24..43a37018575 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -5390,7 +5390,7 @@ gfc_is_simply_contiguous (gfc_expr *expr, bool strict, bool permit_element) gfc_ref *r, *rc; s = expr->symtree->n.sym; - if (s->ts.type != BT_CLASS) + if (s->ts.type != BT_CLASS && s->ts.type != BT_DERIVED) return false; rc = NULL;