aarch64: Add vector floating point extend pattern [PR113880, PR113869]
[official-gcc.git] / gcc / testsuite / gfortran.dg / bessel_5_redux.f90
blob72d2db439595057a1b35c25c1fd3e1bd7aed41ec
1 ! { dg-do compile }
2 ! { dg-options "-Wall" }
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.
7 ! This is a copy of bessel_5.f90 with the error messages added.
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.
14 implicit none
15 integer :: i
18 ! Difference to mpfr_jn <= 1 epsilon
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
27 ! Difference to mpfr_yn <= 4 epsilon
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
35 ! Difference to mpfr_jn <= 1 epsilon
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
44 ! Difference to mpfr_yn <= 192 epsilon
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
53 ! Difference to mpfr_jn: None. (Special case: X = 0.0)
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
61 ! Difference to mpfr_yn: None. (Special case: X = 0.0)
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
69 ! Difference to mpfr_jn <= 1 epsilon
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
77 ! Difference to mpfr_yn <= 32 epsilon
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
85 end