I am using the newest Ifort compiler and the compilation hangs (running forever) when I compile with -O2. I could narrow it down to a few lines of code where an array is allocated to zero size. The following example demonstrates what I am doing, but compiles without any issues. The actual code (part of a bigger project) is attached. It requires some libraries and MPI to build/
program allocate_zero implicit none type :: tParameters real, allocatable, dimension(:,:) :: & gdot0_slip, & !< reference shear strain rate for slip gdot0_twin end type type(tParameters), dimension(:), allocatable :: param integer :: i allocate(param(3)) do i = 1, 3 associate(p => param(i)) if (i > 2) then allocate(p%gdot0_slip(0,0)) endif end associate enddo end program