[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / rshift.f90
blobeb653fd33ccfcbcdf9b27b7528d30ba9093f891c
1 ! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
2 ! Check that a call to RSHIFT is transformed to SHIFTA.
4 subroutine test_default_integer()
5 integer :: i, j, k
6 k = rshift(i, j)
7 !CHECK: k=shifta(i,j)
8 k = rshift(16, 2)
9 !CHECK: k=4_4
10 end
12 subroutine test_integer1()
13 integer(1) :: i, j, k
14 k = rshift(i, j)
15 !CHECK: k=shifta(i,int(j,kind=4))
16 print *, rshift(8_1, 2)
17 !CHECK: PRINT *, 2_1
18 end
20 subroutine test_integer2()
21 integer(2) :: i, j, k
22 k = rshift(i, j)
23 !CHECK: k=shifta(i,int(j,kind=4))
24 print *, rshift(8_2, 2)
25 !CHECK: PRINT *, 2_2
26 end
28 subroutine test_integer4()
29 integer(4) :: i, j, k
30 k = rshift(i, j)
31 !CHECK: k=shifta(i,j)
32 print *, rshift(8_4, 2)
33 !CHECK: PRINT *, 2_4
34 end
36 subroutine test_integer8()
37 integer(8) :: i, j, k
38 k = rshift(i, j)
39 !CHECK: k=shifta(i,int(j,kind=4))
40 print *, rshift(-16_8, 2)
41 !CHECK: PRINT *, -4_8
42 end
44 subroutine test_integer16()
45 integer(16) :: i, j, k
46 k = rshift(i, j)
47 !CHECK: k=shifta(i,int(j,kind=4))
48 print *, rshift(8_16, 2)
49 !CHECK: PRINT *, 2_16
50 end