[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / symbol23.f90
blob82f73098209903ccdff3bb133e7e9763d3992225
1 ! RUN: %python %S/test_symbols.py %s %flang_fc1
2 ! Regression test of name resolution bug
3 !DEF: /m Module
4 module m
5 !DEF: /m/base ABSTRACT, PUBLIC DerivedType
6 type, abstract :: base
7 contains
8 !DEF: /m/base/foo Generic
9 !DEF: /m/base/spec DEFERRED ProcBinding
10 generic :: foo => spec
11 !DEF: /m/iface ABSTRACT, PUBLIC (Subroutine) Subprogram
12 !REF: /m/base/spec
13 procedure(iface), deferred :: spec
14 end type
15 abstract interface
16 !REF: /m/iface
17 !DEF: /m/iface/this ObjectEntity CLASS(base)
18 subroutine iface (this)
19 !REF: /m/base
20 import :: base
21 !REF: /m/base
22 !REF: /m/iface/this
23 class(base) :: this
24 end subroutine
25 end interface
26 !REF: /m/base
27 !DEF: /m/ext PUBLIC DerivedType
28 type, extends(base) :: ext
29 contains
30 !DEF: /m/ext/spec ProcBinding
31 !DEF: /m/foo PUBLIC (Subroutine) Subprogram
32 procedure :: spec => foo
33 end type
34 contains
35 !REF: /m/foo
36 !DEF: /m/foo/this ObjectEntity CLASS(ext)
37 subroutine foo (this)
38 !REF: /m/ext
39 !REF: /m/foo/this
40 class(ext) :: this
41 end subroutine
42 end module