------- Comment #6 from dominiq at lps dot ens dot fr 2009-11-29 17:30 ------- > Can you attach the files generated by -fdump-rtl-ce3 -fdump-rtl-rnreg-details?
I have reduced the test to module test implicit none real(4), parameter :: eps4 = epsilon(0.0_4)*2.0_4 real(8), parameter :: eps8 = epsilon(0.0_8)*2.0_8 interface check procedure check4 end interface check contains SUBROUTINE check4(z, zref) complex(4), intent(in) :: z, zref if ( abs (real(z)-real(zref)) > eps4 & .or.abs (aimag(z)-aimag(zref)) > eps4) then print '(a,/,2((2g0," + I ",g0),/))', "check4:"," z=",z,'zref=',zref print '(a,g0," + I*",g0," eps=",g0)', 'Diff: ', & real(z)-real(zref), & aimag(z)-aimag(zref), eps4 ! call abort() end if END SUBROUTINE check4 end module test PROGRAM ArcTrigHyp use test IMPLICIT NONE complex(4), volatile :: z4 !!!!! ZERO !!!!!! ! z = 0 z4 = cmplx(0.0_4, 0.0_4, kind=4) ! Exact: 0 call check(asin(z4), cmplx(0.0_4, 0.0_4, kind=4)) ! Exact: Pi/2 = 1.5707963267948966192313216916397514 call check(acos(z4), cmplx(1.57079632679489661920_4, 0.0_4, kind=4)) ! Exact: 0 call check(atan(z4), cmplx(0.0_4, 0.0_4, kind=4)) ! Exact: 0 call check(asinh(z4), cmplx(0.0_4, 0.0_4, kind=4)) ! Exact: I*Pi/2 = I*1.5707963267948966192313216916397514 call check(acosh(z4), cmplx(0.0_4, 1.57079632679489661920_4, kind=4)) ! Exact: 0 call check(atanh(z4), cmplx(0.0_4, 0.0_4, kind=4)) !!!!! POSITIVE NUMBERS !!!!!! ! z = tanh(1.0) z4 = cmplx(0.76159415595576488811945828260479359_4, 0.0_4, kind=4) ! Numerically: 0.70502684355523799494171984544790700*I call check(acosh(z4), cmplx(0.0_4, 0.70502684355523799494171984544790700_4, kind=4)) ! Exact: 1 call check(atanh(z4), cmplx(1.0_4, 0.0_4, kind=4)) ! z = I*tanh(1.0) z4 = cmplx(0.0_4, 0.76159415595576488811945828260479359_4, kind=4) ! Numerically: I*0.70239670712987482778422106260749699 call check(asin(z4), cmplx(0.0_4, 0.70239670712987482778422106260749699_4, kind=4)) END PROGRAM ArcTrigHyp Note that the errors fluctuate, depending on the check lines commented. I'll attach the asked files for this reduced test. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220