blob: 20b601a2f51caa8670ac18225b1e99cd24fe1f41 [file] [log] [blame]
! { dg-do compile }
!
! PR 68440: [OOP] ICE on declaring class variable with wrong attribute
!
! Contributed by Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de>
subroutine s
type t
end type
class(t), parameter :: x = t() ! { dg-error "cannot have the PARAMETER attribute" }
class(t), parameter :: y = x ! { dg-error "cannot have the PARAMETER attribute" }
class(t) :: z = x ! { dg-error "must be dummy, allocatable or pointer" }
end