1! Test the MVBITS intrinsic subroutine
2INTEGER*4 :: from, to, result
3integer*8 :: from8, to8
4
5DATA from / z'0003FFFC' /
6DATA to / z'77760000' /
7DATA result / z'7777FFFE' /
8
9CALL mvbits(from, 2, 16, to, 1)
10if (to /= result) STOP 1
11
12to8 = 0_8
13from8 = int(b'1011',8)*2_8**32
14call mvbits (from8, 33, 3, to8, 2)
15if (to8 /= int(b'10100',8)) STOP 1
16end
17