[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / real10-x86-02.f90
blob1e7c0de39305a4d1bc3302a1f92e3f27d5b86139
1 ! RUN: %python %S/test_modfile.py %s %flang_fc1 -triple x86_64-unknown-linux-gnu
2 ! Intrinsics SELECTED_INT_KIND, SELECTED_REAL_KIND, PRECISION, RANGE,
3 ! RADIX, DIGITS
5 module m1
6 ! REAL(KIND=10) handles 16 <= P < 19 (if available; ifort is KIND=16)
7 integer, parameter :: realprec = precision(0._10)
8 logical, parameter :: rpreccheck = 18 == realprec
9 integer, parameter :: realpvals(*) = [16, 18]
10 integer, parameter :: realpkinds(*) = &
11 [(selected_real_kind(realpvals(j),0),j=1,size(realpvals))]
12 logical, parameter :: realpcheck = all([10, 10] == realpkinds)
13 ! REAL(KIND=10) handles 308 <= R < 4932 (if available; ifort is KIND=16)
14 integer, parameter :: realrange = range(0._10)
15 logical, parameter :: rrangecheck = 4931 == realrange
16 integer, parameter :: realrvals(*) = [308, 4931]
17 integer, parameter :: realrkinds(*) = &
18 [(selected_real_kind(0,realrvals(j)),j=1,size(realrvals))]
19 logical, parameter :: realrcheck = all([10, 10] == realrkinds)
20 logical, parameter :: radixcheck = radix(0._10) == 2
22 integer, parameter :: realdigits = digits(0._10)
23 logical, parameter :: realdigitscheck = 64 == realdigits
24 end module m1
25 !Expect: m1.mod
26 !module m1
27 !integer(4),parameter::realprec=18_4
28 !intrinsic::precision
29 !logical(4),parameter::rpreccheck=.true._4
30 !integer(4),parameter::realpvals(1_8:*)=[INTEGER(4)::16_4,18_4]
31 !integer(4),parameter::realpkinds(1_8:*)=[INTEGER(4)::10_4,10_4]
32 !intrinsic::selected_real_kind
33 !intrinsic::size
34 !logical(4),parameter::realpcheck=.true._4
35 !intrinsic::all
36 !integer(4),parameter::realrange=4931_4
37 !intrinsic::range
38 !logical(4),parameter::rrangecheck=.true._4
39 !integer(4),parameter::realrvals(1_8:*)=[INTEGER(4)::308_4,4931_4]
40 !integer(4),parameter::realrkinds(1_8:*)=[INTEGER(4)::10_4,10_4]
41 !logical(4),parameter::realrcheck=.true._4
42 !logical(4),parameter::radixcheck=.true._4
43 !intrinsic::radix
44 !integer(4),parameter::realdigits=64_4
45 !intrinsic::digits
46 !logical(4),parameter::realdigitscheck=.true._4
47 !end