AMDGPU: Allow f16/bf16 for DS_READ_TR16_B64 gfx950 builtins (#118297)
[llvm-project.git] / flang / test / Semantics / offsets01.f90
blobccd70769bcee69e10fe261d7f0f8296fdc20076c
1 !RUN: %flang_fc1 -fdebug-dump-symbols %s | FileCheck %s
3 ! Size and alignment of intrinsic types
4 subroutine s1
5 integer(1) :: a_i1 !CHECK: a_i1 size=1 offset=0:
6 integer(8) :: b_i8 !CHECK: b_i8 size=8 offset=8:
7 real(2) :: c_r2 !CHECK: c_r2 size=2 offset=16:
8 real(2) :: d_r2 !CHECK: d_r2 size=2 offset=18:
9 real(8) :: e_r8 !CHECK: e_r8 size=8 offset=24:
10 real(4) :: f_r4 !CHECK: f_r4 size=4 offset=32:
11 complex(8) :: g_c8 !CHECK: g_c8 size=16 offset=40:
12 complex(4) :: h_c4 !CHECK: h_c4 size=8 offset=56:
13 logical :: i_l4 !CHECK: i_l4 size=4 offset=64:
14 end
16 ! Character
17 subroutine s2
18 character(10) :: c1 !CHECK: c1 size=10 offset=0:
19 character(1) :: c2 !CHECK: c2 size=1 offset=10:
20 character(10,kind=2) :: c3 !CHECK: c3 size=20 offset=12:
21 end
23 ! Descriptors
24 subroutine s3(n)
25 integer :: n
26 real, pointer :: x !CHECK: x, POINTER size=24 offset=8:
27 character(n) :: y !CHECK: y size=24 offset=32:
28 end
30 ! Descriptors for arrays
31 subroutine s4
32 integer, allocatable :: z0 !CHECK: z0, ALLOCATABLE size=24 offset=
33 integer, allocatable :: z1(:) !CHECK: z1, ALLOCATABLE size=48 offset=
34 integer, allocatable :: z2(:,:) !CHECK: z2, ALLOCATABLE size=72 offset=
35 integer, allocatable :: z3(:,:,:) !CHECK: z3, ALLOCATABLE size=96 offset=
36 end
38 ! Descriptors with length parameters
39 subroutine s5(n)
40 integer :: n
41 type :: t1(n)
42 integer, len :: n
43 real :: a(n)
44 end type
45 type :: t2(n1, n2)
46 integer, len :: n1
47 integer, len :: n2
48 real :: b(n1, n2)
49 end type
50 type(t1(n)) :: x1 !CHECK: x1 size=40 offset=
51 type(t2(n,n)) :: x2 !CHECK: x2 size=48 offset=
52 !CHECK: a size=48 offset=0:
53 !CHECK: b size=72 offset=0:
54 end