[Bug fortran/125610] Bogus runtime error: Assignment of scalar to unallocated array

anlauf at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 4 19:32:25 GMT 2026


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

--- Comment #2 from Harald Anlauf <anlauf at gcc dot gnu.org> ---
It works with TYPE:

   function foo_factory_1_(i) result(foo)
     integer, intent(in)       :: i(:)
     type(foo_t), allocatable :: foo(:)
...

instead of CLASS.


More information about the Gcc-bugs mailing list