reduce loop depth
reduce loop depth for Fortran