aarch64: Add vector floating point extend pattern [PR113880, PR113869]
[official-gcc.git] / gcc / testsuite / gfortran.dg / ishft_3.f90
blob626e71ce44ef7347435821fc1f01f9e9a1cd1243
1 ! { dg-do compile }
2 ! PR fortran/50514
3 program ishft_3
5 implicit none
7 integer j, m
9 m = 42
11 ! These should compile.
13 j = ishft(m, 16)
14 j = ishft(m, -16)
15 j = ishftc(m, 16)
16 j = ishftc(m, -16)
18 ! These should issue an error.
20 j = ishft(m, 640) ! { dg-error "absolute value of SHIFT" }
21 j = ishftc(m, 640) ! { dg-error "absolute value of SHIFT" }
22 j = ishft(m, -640) ! { dg-error "absolute value of SHIFT" }
23 j = ishftc(m, -640) ! { dg-error "absolute value of SHIFT" }
25 ! abs(SHIFT) must be <= SIZE
27 j = ishftc(m, 1, 2)
28 j = ishftc(m, 1, 2)
29 j = ishftc(m, -1, 2)
30 j = ishftc(m, -1, 2)
32 j = ishftc(m, 10, 2)! { dg-error "absolute value of SHIFT" }
33 j = ishftc(m, 10, 2)! { dg-error "absolute value of SHIFT" }
34 j = ishftc(m, -10, 2)! { dg-error "absolute value of SHIFT" }
35 j = ishftc(m, -10, 2)! { dg-error "absolute value of SHIFT" }
37 j = ishftc(m, 1, -2) ! { dg-error "must be positive" }
38 end program