aarch64: Add vector floating point extend pattern [PR113880, PR113869]
[official-gcc.git] / gcc / testsuite / gfortran.dg / cshift_nan_1.f90
blob96a136fda2c4b541e1ed37dfb3dd0b9798767621
1 ! { dg-do run }
2 ! Test cshift where the values are eight bytes,
3 ! but are aligned on a four-byte boundary. The
4 ! integers correspond to NaN values.
5 program main
6 implicit none
7 integer :: i
8 type t
9 sequence
10 integer :: a,b
11 end type t
12 type(t), dimension(4) :: u,v
13 common /foo/ u, i, v
15 u(1)%a = 2142240768
16 u(2)%a = 2144337920
17 u(3)%a = -5242880
18 u(4)%a = -3145728
19 u%b = (/(i,i=-1,-4,-1)/)
20 v(1:3:2) = cshift(u(1:3:2),1)
21 v(2:4:2) = cshift(u(2:4:2),-1)
22 if (any(v%a /= (/-5242880, -3145728, 2142240768, 2144337920 /))) STOP 1
23 if (any(v%b /= (/-3, -4, -1, -2/))) STOP 2
24 end program main