aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/select_type_32.f90
blob: 5e366398acb7b78c698801c52c46034de2281094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do compile }
!
! PR fortran/55763
!
! Contributed by Harald Anlauf
!

module gfcbug122
  implicit none
  type myobj
     class(*), allocatable :: x
   contains
     procedure :: print
  end type myobj
contains
  subroutine print(this)
    class(myobj) :: this
    select type (this)
    type is (integer) ! { dg-error "Unexpected intrinsic type 'INTEGER'" }
    type is (real) ! { dg-error "Unexpected intrinsic type 'REAL'" }
    type is (complex) ! { dg-error "Unexpected intrinsic type 'COMPLEX'" }
    type is (character(len=*)) ! { dg-error "Unexpected intrinsic type 'CHARACTER'" }
    end select
  end subroutine print
end module gfcbug122