https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94578
--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Also wrong: program main implicit none type foo integer :: x, y end type foo integer :: i integer, dimension (2,2) :: array2d integer, dimension(:), pointer :: array1d type(foo), dimension(2*2), target :: solution data array2d /1,3,2,4/ array1d => solution%x array1d = reshape (source=array2d, shape=shape(array1d)) print *,maxval(array2d) print *,maxval(array1d) end program main prints 4 2