[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / symbol14.f90
blob2b75411bb6721f2425a8174b173e72b168caa7df
1 ! RUN: %python %S/test_symbols.py %s %flang_fc1
2 ! "Bare" uses of type parameters
3 !DEF: /MainProgram1/t1 DerivedType
4 !DEF: /MainProgram1/t1/k TypeParam INTEGER(4)
5 type :: t1(k)
6 !REF: /MainProgram1/t1/k
7 integer, kind :: k=666
8 !DEF: /MainProgram1/t1/a ObjectEntity REAL(4)
9 !REF: /MainProgram1/t1/k
10 real :: a(k)
11 end type t1
12 !REF: /MainProgram1/t1
13 !DEF: /MainProgram1/t2 DerivedType
14 type, extends(t1) :: t2
15 !DEF: /MainProgram1/t2/b ObjectEntity REAL(4)
16 !REF: /MainProgram1/t1/k
17 real :: b(k)
18 !DEF: /MainProgram1/t2/c ObjectEntity REAL(4)
19 !DEF: /MainProgram1/size INTRINSIC, PURE (Function) ProcEntity
20 !DEF: /MainProgram1/a (Implicit) ObjectEntity REAL(4)
21 real :: c(size(a))
22 !REF: /MainProgram1/t1
23 !DEF: /MainProgram1/t2/x ObjectEntity TYPE(t1(k=666_4))
24 type(t1) :: x
25 end type t2
26 end program