Hi ,
I have internal compiler error with the following code, trying to convert from int to quadruple precision inside a loop with at least -O2 . Compiler version 14. It works with double precision.
Thanks
program foo implicit none integer,parameter :: q = selected_real_kind(2*precision(1d0)) real(q) :: k integer :: i do i=1,100 k=real(i,q) print *,factorial1(k) end do contains function factorial1(n) result(res) real(q) :: n real(q) :: res integer :: i res=1._q do i=int(n),1,-1 res=res*i end do end function factorial1 end program foo