OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [intrinsic_bitops.f90] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
! Program to test intrinsic bitops
2
program intrinsic_bitops
3
   implicit none
4
   integer(kind=4) :: i, j, k, o, t
5
   integer(kind=8) :: a, b, c
6
 
7
   o = 0
8
   i = 2
9
   j = 3
10
   k = 12
11
 
12
   if (.not. btest (i, o+1)) call abort
13
   if (btest (i, o+2)) call abort
14
   if (iand (i, j) .ne. 2) call abort
15
   if (ibclr (j, o+1) .ne. 1) call abort
16
   if (ibclr (j, o+2) .ne. 3) call abort
17
   if (ibits (k, o+1, o+2) .ne. 2) call abort
18
   if (ibset (j, o+1) .ne. 3) call abort
19
   if (ibset (j, o+2) .ne. 7) call abort
20
   if (ieor (i, j) .ne. 1) call abort
21
   if (ior (i, j) .ne. 3) call abort
22
   if (ishft (k, o+2) .ne. 48) call abort
23
   if (ishft (k, o-3) .ne. 1) call abort
24
   if (ishft (k, o) .ne. 12) call abort
25
   if (ishftc (k, o+30) .ne. 3) call abort
26
   if (ishftc (k, o-30) .ne. 48) call abort
27
   if (ishftc (k, o+1, o+3) .ne. 9) call abort
28
   if (not (i) .ne. -3) call abort
29
end program

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.