1! { dg-do compile }
2! { dg-options "-std=f2003" }
3!
4! PR fortran/33197
5!
6! Check for Fortran 2008's ATAN(Y,X) - which is equivalent
7! to Fortran 77's ATAN2(Y,X).
8!
9real(4)    :: r4
10real(8)    :: r8
11complex(4) :: c4
12complex(8) :: c8
13
14r4 = atan2(r4,r4)
15r8 = atan2(r8,r8)
16
17r4 = atan(r4,r4) ! { dg-error "Too many arguments in call to 'atan'" }
18r8 = atan(r8,r8) ! { dg-error "Too many arguments in call to 'atan'" }
19
20r4 = atan2(r4,r8) ! { dg-error "same type and kind" }
21r4 = atan2(r8,r4) ! { dg-error "same type and kind" }
22
23r4 = atan2(c4,r8) ! { dg-error "must be REAL" }
24r4 = atan2(c8,r4) ! { dg-error "must be REAL" }
25r4 = atan2(r4,c8) ! { dg-error "same type and kind" }
26r4 = atan2(r8,c4) ! { dg-error "same type and kind" }
27
28r4 = atan2(c4,c8) ! { dg-error "must be REAL" }
29r4 = atan2(c8,c4) ! { dg-error "must be REAL" }
30end
31