https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83017
--- Comment #5 from Christian Felter <cfztol at hotmail dot com> --- Okay, sounds like there is hope. By the way, the problem also exists without a function call. Declaring real, dimension(nsplit) :: tmp and replacing the loop with do concurrent (i = 1:nsplit) tmp = 0 do j = low(i), high(i) k = mod( j, nsplit ) + 1 tmp(k) = tmp(k) + (-1)**(j+1) / real( 2*j-1 ) end do pi(i) = sum(tmp) end do also inhibits parallelization.