aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/class_53.f90
blob: 83f55712d0b6eb9cecc720f98eaa279ea9f2d1b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do compile }
!
! PR 54778: [OOP] an ICE on invalid OO code
!
! Contributed by Sylwester Arabas <slayoo@staszic.waw.pl>

implicit none

type :: arr_t
  real :: at
end type

type(arr_t) :: this
class(arr_t) :: elem   ! { dg-error "must be dummy, allocatable or pointer" }

elem = this   ! { dg-error "Nonallocatable variable must not be polymorphic in intrinsic assignment" }

end