PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / lrshift_1.f90
blob7feed2962ea7af2358e2572aec92b7d1b4a3b554
1 ! { dg-do run }
2 ! { dg-options "-std=gnu -w" }
3 ! { dg-additional-sources lrshift_1.c }
4 program test_rshift_lshift
5 implicit none
6 integer :: i(15), j, n
7 integer, external :: c_lshift, c_rshift
9 i = (/ -huge(i), -huge(i)/2, -129, -128, -127, -2, -1, 0, &
10 1, 2, 127, 128, 129, huge(i)/2, huge(i) /)
12 do n = 1, size(i)
13 do j = -30, 30
14 if (lshift(i(n),j) /= c_lshift(i(n),j)) call abort
15 if (rshift(i(n),j) /= c_rshift(i(n),j)) call abort
16 end do
17 end do
18 end program test_rshift_lshift