2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / complex_intrinsic_6.f90
blob5cde928baad73a414dc11196f67e09bdc120ef6d
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003" }
4 ! PR fortran/33197
5 ! PR fortran/40728
7 ! Complex inverse trigonometric functions
8 ! and complex inverse hyperbolic functions
10 ! Argument type check
13 PROGRAM ArcTrigHyp
14 IMPLICIT NONE
15 real(4), volatile :: r4
16 real(8), volatile :: r8
17 complex(4), volatile :: z4
18 complex(8), volatile :: z8
20 r4 = 0.0_4
21 r8 = 0.0_8
22 z4 = cmplx(0.0_4, 0.0_4, kind=4)
23 z8 = cmplx(0.0_8, 0.0_8, kind=8)
25 r4 = asin(r4)
26 r8 = asin(r8)
27 r4 = acos(r4)
28 r8 = acos(r8)
29 r4 = atan(r4)
30 r8 = atan(r8)
32 ! a(sin,cos,tan)h cannot be checked as they are not part of
33 ! Fortran 2003 - not even for real arguments
35 z4 = asin(z4) ! { dg-error "Fortran 2008: COMPLEX argument" }
36 z8 = asin(z8) ! { dg-error "Fortran 2008: COMPLEX argument" }
37 z4 = acos(z4) ! { dg-error "Fortran 2008: COMPLEX argument" }
38 z8 = acos(z8) ! { dg-error "Fortran 2008: COMPLEX argument" }
39 z4 = atan(z4) ! { dg-error "Fortran 2008: COMPLEX argument" }
40 z8 = atan(z8) ! { dg-error "Fortran 2008: COMPLEX argument" }
41 END PROGRAM ArcTrigHyp