OSDN Git Service

fortran/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.fortran-torture / execute / intrinsic_mvbits.f90
1 ! Test the MVBITS intrinsic subroutine
2 INTEGER*4 :: from, to, result
3 integer*8 :: to8
4
5 DATA from / z'0003FFFC' /
6 DATA to / z'77760000' /
7 DATA result / z'7777FFFE' /
8
9 CALL mvbits(from, 2, 16, to, 1)
10 if (to /= result) CALL abort()
11
12 to8 = 0
13 call mvbits (b'1011'_8*2_8**32, 33, 3, to8, 2)
14 if (to8 /= b'10100'_8) call abort
15 end