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