c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / select_type_29.f03
blob71603e3841a8c2ea2c30de63d60cb8491217d8f1
1 ! { dg-do compile }
3 ! PR 54435: [4.7/4.8 Regression] ICE with SELECT TYPE on a non-CLASS object
5 ! Contributed by xarthisius
7 subroutine foo(x)
8   integer :: x
9   select type (x)   ! { dg-error "Selector shall be polymorphic" }
10   end select
11 end
14 ! PR 54443: [4.7/4.8 Regression] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
16 ! Contributed by Mark Beyer <mbeyer@cirrusaircraft.com>
18 program class_test
19   type hashnode
20     character(4) :: htype
21   end type
22   class(hashnode), pointer :: hp
24   select type(hp%htype)   ! { dg-error "is not a named variable" }
26 end program