Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/atan2_2.f90 @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
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 ! | |
9 real(4) :: r4 | |
10 real(8) :: r8 | |
11 complex(4) :: c4 | |
12 complex(8) :: c8 | |
13 | |
14 r4 = atan2(r4,r4) | |
15 r8 = atan2(r8,r8) | |
16 | |
17 r4 = atan(r4,r4) ! { dg-error "Too many arguments in call to 'atan'" } | |
18 r8 = atan(r8,r8) ! { dg-error "Too many arguments in call to 'atan'" } | |
19 | |
20 r4 = atan2(r4,r8) ! { dg-error "same type and kind" } | |
21 r4 = atan2(r8,r4) ! { dg-error "same type and kind" } | |
22 | |
23 r4 = atan2(c4,r8) ! { dg-error "must be REAL" } | |
24 r4 = atan2(c8,r4) ! { dg-error "must be REAL" } | |
25 r4 = atan2(r4,c8) ! { dg-error "same type and kind" } | |
26 r4 = atan2(r8,c4) ! { dg-error "same type and kind" } | |
27 | |
28 r4 = atan2(c4,c8) ! { dg-error "must be REAL" } | |
29 r4 = atan2(c8,c4) ! { dg-error "must be REAL" } | |
30 end |