1! { dg-do compile }
2!
3! PR 44616: [OOP] ICE if CLASS(foo) is used before its definition
4!
5! Contributed by bd satish <bdsatish@gmail.com>
6
7module factory_pattern
8implicit none
9
10type First_Factory
11    character(len=20) :: factory_type
12    class(Connection), pointer :: connection_type
13    contains
14end type First_Factory
15
16type, abstract :: Connection
17    contains
18    procedure(generic_desc), deferred :: description
19end type Connection
20
21abstract interface
22    subroutine generic_desc(self)
23        import  ! Required, cf. PR 44614
24        class(Connection) :: self
25    end subroutine generic_desc
26end interface
27end module factory_pattern
28