File: intrinsics_182.f90

package info (click to toggle)
lfortran 0.45.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 46,332 kB
  • sloc: cpp: 137,068; f90: 51,260; python: 6,444; ansic: 4,277; yacc: 2,285; fortran: 806; sh: 524; makefile: 30; javascript: 15
file content (42 lines) | stat: -rw-r--r-- 1,082 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
program intrinsics_182
    use iso_fortran_env, only: dp => real64
    integer :: i, j, shift1
    integer(8) :: a, b, shift2
    i = 10
    j = 4
    shift1 = 3
    a = 7
    b = 12
    shift2 = 5

    print *, dshiftl(10, 4, 3)
    if(dshiftl(10, 4, 3) /= 80) error stop

    print *, dshiftl(7_dp, 12_dp, 5)
    if(dshiftl(7_dp, 12_dp , 5) /= 224) error stop

    print *, dshiftl(10, 12, 7)
    if(dshiftl(10, 12, 7) /= 1280) error stop

    print *, dshiftl(i, j, shift1)
    if(dshiftl(i, j, shift1) /= 80) error stop

    print *, dshiftl(a, b, shift2)
    if(dshiftl(a, b, shift2) /= 224) error stop

    print *, kind(dshiftl(10, 4, 3))
    if(kind(dshiftl(10, 4, 3)) /= 4) error stop

    print *, kind(dshiftl(7_dp, 12_dp, 5))
    if(kind(dshiftl(7_dp, 12_dp, 5)) /= 8) error stop

    print *, kind(dshiftl(10, 12, 7))
    if(kind(dshiftl(10, 12, 7)) /= 4) error stop

    print *, kind(dshiftl(i, j, shift1))
    if(kind(dshiftl(i, j, shift1)) /= 4) error stop

    print *, kind(dshiftl(a, b, shift2))
    if(kind(dshiftl(a, b, shift2)) /= 8) error stop

end program