https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64943

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
In principle, we do have a similar check in resolve.c's resolve_transfer. The
question is why it doesn't trigger.

  if (ts->type == BT_CLASS)
    {
      /* FIXME: Test for defined input/output.  */
      gfc_error ("Data transfer element at %L cannot be polymorphic unless "
                "it is processed by a defined input/output procedure",
                &code->loc);
      return;
...
      if (ts->u.derived->attr.alloc_comp)
        {
          gfc_error ("Data transfer element at %L cannot have ALLOCATABLE "
                     "components unless it is processed by a defined "
                     "input/output procedure", &code->loc);
          return;

Reply via email to