https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97589
--- Comment #16 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- program random_weather implicit none type global_model_state real, allocatable :: ps(:,:) [:,:] end type global_model_state integer :: nxslab, nyslab type(global_model_state) :: ms_full integer :: i, time, np1, np2, npx, npy, npxy real, parameter :: PS = 100000.0, T = 300.0, U = 0.0, V = 0.0, W = 0.0, Q = 0.002 ! Mean value npxy = num_images() nxslab = 72 nyslab = 70 npx = 1 allocate( ms_full % ps(0:nxslab-1, 0:nyslab-1) [0:npx-1, 0:*] ) ms_full % ps = PS end program random_weather