!======================================================================
program test
  implicit none

  integer, parameter :: db = kind(1.0d0)
  integer, parameter :: sg = kind(1.0)


  integer, parameter :: stdout = 6

  ! local variables
  integer :: itmp, i, ierr, m

  complex(db), allocatable :: zz(:,:)
  complex(sg), allocatable :: cc(:,:)

  !character(len=198) :: mversion

     
  !call mkl_get_version_string(mversion)
  !write(stdout,*) mversion

  m = 5868

  allocate(zz(m,m),stat=ierr)
  write(stdout,*) 'IERR: ', ierr
  allocate(cc(m,m),stat=ierr)
  write(stdout,*) 'IERR: ', ierr

  !zz = 0._db ! This line ok
  !zz = cmplx(0._db,0._db,db) ! This line crashes

  cc = 0._sg ! This line ok
  cc = cmplx(0._sg,0._sg,sg) ! This line crashes

  deallocate(zz,cc)

end program test

