2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / dshift_3.f90
blob1f214c7d1c76cff314a7fa38c38a845d2482fd31
1 ! { dg-do compile }
2 ! PR fortran/50753
3 subroutine foo(i, j, k)
5 implicit none
7 integer(4), intent(in) :: i, j
8 integer(8), intent(in) :: k
10 print *, dshiftl(i, j, 134) ! { dg-error "must be less than or equal" }
11 print *, dshiftl(z'FFF', j, 134) ! { dg-error "must be less than or equal" }
12 print *, dshiftl(i, j, -10) ! { dg-error "must be nonnegative" }
13 print *, dshiftl(z'FFF', z'EEE', 10) ! { dg-error "cannot both be" }
14 print *, dshiftl(z'FFF', j, 10)
15 print *, dshiftl(i, z'EEE', 10)
16 print *, dshiftl(i, j, 10)
17 print *, dshiftl(i, k, 10) ! { dg-error "must be the same type and kind" }
18 print *, dshiftl(k, j, 10) ! { dg-error "must be the same type and kind" }
19 print *, dshiftl(i, j, k)
20 print *, dshiftl(i, j, z'd')
22 print *, dshiftr(i, j, 134) ! { dg-error "must be less than or equal" }
23 print *, dshiftr(z'FFF', j, 134) ! { dg-error "must be less than or equal" }
24 print *, dshiftr(i, j, -10) ! { dg-error "must be nonnegative" }
25 print *, dshiftr(z'FFF', z'EEE', 10) ! { dg-error "cannot both be" }
26 print *, dshiftr(z'FFF', j, 10)
27 print *, dshiftr(i, z'EEE', 10)
28 print *, dshiftr(i, j, 10)
29 print *, dshiftr(i, k, 10) ! { dg-error "must be the same type and kind" }
30 print *, dshiftr(k, j, 10) ! { dg-error "must be the same type and kind" }
31 print *, dshiftr(i, j, k)
32 print *, dshiftr(i, j, z'd')
34 end subroutine foo