1! { dg-do compile }
2!
3! PR fortran/55763
4!
5! Contributed by Harald Anlauf
6!
7
8module gfcbug122
9  implicit none
10  type myobj
11     class(*), allocatable :: x
12   contains
13     procedure :: print
14  end type myobj
15contains
16  subroutine print(this)
17    class(myobj) :: this
18    select type (this)
19    type is (integer) ! { dg-error "Unexpected intrinsic type 'INTEGER'" }
20    type is (real) ! { dg-error "Unexpected intrinsic type 'REAL'" }
21    type is (complex) ! { dg-error "Unexpected intrinsic type 'COMPLEX'" }
22    type is (character(len=*)) ! { dg-error "Unexpected intrinsic type 'CHARACTER'" }
23    end select
24  end subroutine print
25end module gfcbug122
26