2017-11-09 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_59.f90
blobe077ef8dc302e49a40b19109634ea3fd2584729d
1 ! { dg-do compile }
3 ! PR 71894: [OOP] ICE in gfc_add_component_ref, at fortran/class.c:227
5 ! Contributed by Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de>
7 subroutine s1
8 type t
9 integer :: n
10 end type
11 type(t) :: x
12 class(t) :: y ! { dg-error "must be dummy, allocatable or pointer" }
13 x = y
14 end
16 subroutine s2
17 type t
18 end type
19 class(t) :: x ! { dg-error "must be dummy, allocatable or pointer" }
20 class(t), allocatable :: y
21 select type (y)
22 type is (t)
23 y = x
24 end select
25 end