Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/bessel_5_redux.f90 @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 ! { dg-do compile } | |
2 ! { dg-options "-Wall" } | |
3 ! | |
4 ! Check fix for PR94246 in which the errors in line 63 caused a segfault | |
5 ! because the cleanup was not done correctly without the -fno-range-check option. | |
6 ! | |
7 ! This is a copy of bessel_5.f90 with the error messages added. | |
8 ! | |
9 ! -Wall has been specified to disabled -pedantic, which warns about the | |
10 ! negative order (GNU extension) to the order of the Bessel functions of | |
11 ! first and second kind. | |
12 ! | |
13 | |
14 implicit none | |
15 integer :: i | |
16 | |
17 | |
18 ! Difference to mpfr_jn <= 1 epsilon | |
19 | |
20 if (any (abs (BESSEL_JN(2, 5, 2.457) - [(BESSEL_JN(i, 2.457), i = 2, 5)]) & | |
21 > epsilon(0.0))) then | |
22 print *, 'FAIL 1' | |
23 STOP 1 | |
24 end if | |
25 | |
26 | |
27 ! Difference to mpfr_yn <= 4 epsilon | |
28 | |
29 if (any (abs (BESSEL_YN(2, 5, 2.457) - [(BESSEL_YN(i, 2.457), i = 2, 5)]) & | |
30 > epsilon(0.0)*4)) then | |
31 STOP 2 | |
32 end if | |
33 | |
34 | |
35 ! Difference to mpfr_jn <= 1 epsilon | |
36 | |
37 if (any (abs (BESSEL_JN(0, 10, 4.457) & | |
38 - [ (BESSEL_JN(i, 4.457), i = 0, 10) ]) & | |
39 > epsilon(0.0))) then | |
40 STOP 3 | |
41 end if | |
42 | |
43 | |
44 ! Difference to mpfr_yn <= 192 epsilon | |
45 | |
46 if (any (abs (BESSEL_YN(0, 10, 4.457) & | |
47 - [ (BESSEL_YN(i, 4.457), i = 0, 10) ]) & | |
48 > epsilon(0.0)*192)) then | |
49 STOP 4 | |
50 end if | |
51 | |
52 | |
53 ! Difference to mpfr_jn: None. (Special case: X = 0.0) | |
54 | |
55 if (any (BESSEL_JN(0, 10, 0.0) /= [ (BESSEL_JN(i, 0.0), i = 0, 10) ])) & | |
56 then | |
57 STOP 5 | |
58 end if | |
59 | |
60 | |
61 ! Difference to mpfr_yn: None. (Special case: X = 0.0) | |
62 | |
63 if (any (BESSEL_YN(0, 10, 0.0) /= [ (BESSEL_YN(i, 0.0), i = 0, 10) ])) & ! { dg-error "overflows|-INF" } | |
64 then | |
65 STOP 6 | |
66 end if | |
67 | |
68 | |
69 ! Difference to mpfr_jn <= 1 epsilon | |
70 | |
71 if (any (abs (BESSEL_JN(0, 10, 1.0) & | |
72 - [ (BESSEL_JN(i, 1.0), i = 0, 10) ]) & | |
73 > epsilon(0.0)*1)) then | |
74 STOP 7 | |
75 end if | |
76 | |
77 ! Difference to mpfr_yn <= 32 epsilon | |
78 | |
79 if (any (abs (BESSEL_YN(0, 10, 1.0) & | |
80 - [ (BESSEL_YN(i, 1.0), i = 0, 10) ]) & | |
81 > epsilon(0.0)*32)) then | |
82 STOP 8 | |
83 end if | |
84 | |
85 end |