aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/allocate_class_2.f90
blob: 733dca62b99b783886e3c00875521b678906201f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! { dg-do compile }
!
! PR 52552: [OOP] ICE when trying to allocate non-allocatable object giving a dynamic type
!
! Contributed by <gccbgz.lionm@xoxy.net>


  type t
    integer :: i
  end type
  
  class(t) :: o      ! { dg-error "must be dummy, allocatable or pointer" }

  allocate(t::o)     ! { dg-error "is neither a data pointer nor an allocatable variable" }

end