2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / select_type_32.f90
blob5e366398acb7b78c698801c52c46034de2281094
1 ! { dg-do compile }
3 ! PR fortran/55763
5 ! Contributed by Harald Anlauf
8 module gfcbug122
9 implicit none
10 type myobj
11 class(*), allocatable :: x
12 contains
13 procedure :: print
14 end type myobj
15 contains
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
25 end module gfcbug122