1! { dg-do compile }
2!
3! PR 54243: [OOP] ICE (segfault) in gfc_type_compatible for invalid BT_CLASS
4!
5! Contributed by Sylwester Arabas <slayoo@staszic.waw.pl>
6
7module aqq_m
8  type :: aqq_t
9  contains
10    procedure :: aqq_init
11  end type 
12 contains
13  subroutine aqq_init(this)
14    class(aqq_t) :: this
15  end subroutine
16end module
17
18program bug2
19  use aqq_m
20  class(aqq_t) :: aqq  ! { dg-error "must be dummy, allocatable or pointer" }
21  call aqq%aqq_init
22end program
23
24! { dg-final { cleanup-modules "aqq_m" } }
25