From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gfortran.dg/complex_intrinsic_3.f90 | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/complex_intrinsic_3.f90 (limited to 'gcc/testsuite/gfortran.dg/complex_intrinsic_3.f90') diff --git a/gcc/testsuite/gfortran.dg/complex_intrinsic_3.f90 b/gcc/testsuite/gfortran.dg/complex_intrinsic_3.f90 new file mode 100644 index 000000000..f0d12d6ef --- /dev/null +++ b/gcc/testsuite/gfortran.dg/complex_intrinsic_3.f90 @@ -0,0 +1,39 @@ +! { dg-do run } +! +! PR fortran/33197 +! +! Fortran 2008 complex trigonometric functions: tan, cosh, sinh, tanh +! +implicit none +real(4), parameter :: pi = 2*acos(0.0_4) +real(8), parameter :: pi8 = 2*acos(0.0_8) +real(4), parameter :: eps = 10*epsilon(0.0_4) +real(8), parameter :: eps8 = 10*epsilon(0.0_8) +complex(4), volatile :: z0_0 = cmplx(0.0_4, 0.0_4, kind=4) +complex(4), volatile :: z1_1 = cmplx(1.0_4, 1.0_4, kind=4) +complex(4), volatile :: zp_p = cmplx(pi, pi, kind=4) +complex(8), volatile :: z80_0 = cmplx(0.0_8, 0.0_8, kind=8) +complex(8), volatile :: z81_1 = cmplx(1.0_8, 1.0_8, kind=8) +complex(8), volatile :: z8p_p = cmplx(pi8, pi8, kind=8) + +if (abs(tan(z0_0) - cmplx(0.0,0.0,4)) > eps) call abort() +if (abs(tan(z1_1) - cmplx(0.27175257,1.0839232,4)) > eps) call abort() +if (abs(tan(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) call abort() +if (abs(tan(z81_1) - cmplx(0.27175258531951174_8,1.0839233273386946_8,8)) > eps8) call abort() + +if (abs(cosh(z0_0) - cmplx(1.0,0.0,4)) > eps) call abort() +if (abs(cosh(z1_1) - cmplx(0.83372992,0.98889768,4)) > eps) call abort() +if (abs(cosh(z80_0) - cmplx(1.0_8,0.0_8,8)) > eps8) call abort() +if (abs(cosh(z81_1) - cmplx(0.83373002513114913_8,0.98889770576286506_8,8)) > eps8) call abort() + +if (abs(sinh(z0_0) - cmplx(0.0,0.0,4)) > eps) call abort() +if (abs(sinh(z1_1) - cmplx(0.63496387,1.2984575,4)) > eps) call abort() +if (abs(sinh(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) call abort() +if (abs(sinh(z81_1) - cmplx(0.63496391478473613_8,1.2984575814159773_8,8)) > eps8) call abort() + +if (abs(tanh(z0_0) - cmplx(0.0,0.0,4)) > eps) call abort() +if (abs(tanh(z1_1) - cmplx(1.0839232,0.27175257,4)) > eps) call abort() +if (abs(tanh(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) call abort() +if (abs(tanh(z81_1) - cmplx(1.0839233273386946_8,0.27175258531951174_8,8)) > eps8) call abort() + +end -- cgit v1.2.3