aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/select_type_29.f03
blob: 71603e3841a8c2ea2c30de63d60cb8491217d8f1 (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
26
! { dg-do compile }
!
! PR 54435: [4.7/4.8 Regression] ICE with SELECT TYPE on a non-CLASS object
!
! Contributed by xarthisius

subroutine foo(x)
  integer :: x
  select type (x)   ! { dg-error "Selector shall be polymorphic" }
  end select
end


! PR 54443: [4.7/4.8 Regression] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
!
! Contributed by Mark Beyer <mbeyer@cirrusaircraft.com>

program class_test
  type hashnode
    character(4) :: htype
  end type
  class(hashnode), pointer :: hp

  select type(hp%htype)   ! { dg-error "is not a named variable" }

end program