[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / symbol21.f90
blobb2d5af6a60ef834af30316b2a8fe86ba2bc8b263
1 ! RUN: %python %S/test_symbols.py %s %flang_fc1
2 ! Derived type forward reference regression case
4 !DEF: /MainProgram1/t2 DerivedType
5 type :: t2
6 !DEF: /MainProgram1/t1 DerivedType
7 !DEF: /MainProgram1/t2/ptr POINTER ObjectEntity TYPE(t1)
8 type(t1), pointer :: ptr
9 end type
10 !REF: /MainProgram1/t1
11 type :: t1
12 !DEF: /MainProgram1/t1/a ObjectEntity REAL(4)
13 real :: a
14 !REF: /MainProgram1/t2
15 !DEF: /MainProgram1/t1/p2 POINTER ObjectEntity TYPE(t2)
16 type(t2), pointer :: p2
17 !REF: /MainProgram1/t1
18 !DEF: /MainProgram1/t1/p1 POINTER ObjectEntity TYPE(t1)
19 type(t1), pointer :: p1
20 end type
21 !REF: /MainProgram1/t1
22 !DEF: /MainProgram1/x1 POINTER ObjectEntity TYPE(t1)
23 !DEF: /MainProgram1/x2 POINTER ObjectEntity TYPE(t1)
24 type(t1), pointer :: x1, x2
25 !REF: /MainProgram1/x2
26 !REF: /MainProgram1/t1/p1
27 !REF: /MainProgram1/t1/a
28 !REF: /MainProgram1/x1
29 x2%p1%a = x1%a
30 end program