https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578
--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- The bug appears to affect intrinsics only, for example this program main implicit none type foo integer :: x, y end type foo integer, dimension(:), pointer :: bp type (foo), dimension(4), target :: b data b%x /1,2,3,4/ data b%y /-1,-2,-3,-4/ bp => b%x bp = x() print *,bp contains function x() integer, dimension(4) :: x x = [11,12,13,14] end function x end program main works as expected (and creates an array temporary). Let's see what we can do here, if this should be solved on the library side or if we should just insert a temporary array here...