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

--- Comment #14 from Paul Thomas <pault at gcc dot gnu.org> ---
For the record, the fix is:

diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 1d973d12ff1..1a03e458d99 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -11760,6 +11760,7 @@ generate_component_assignments (gfc_code **code,
gfc_namespace *ns)
         of all kinds and allocatable components.  */
       if (!gfc_bt_struct (comp1->ts.type)
          || comp1->attr.pointer
+         || comp1->attr.allocatable
          || comp1->attr.proc_pointer_comp
          || comp1->attr.class_pointer
          || comp1->attr.proc_pointer)

Reply via email to