1! { dg-do compile } 2! 3! PR 88047: [9 Regression] ICE in gfc_find_vtab, at fortran/class.c:2843 4! 5! Contributed by G. Steinmetz <gscfq@t-online.de> 6 7subroutine sub_a 8 type t 9 end type 10 class(t) :: x(2) ! { dg-error "must be dummy, allocatable or pointer" } 11 class(t), parameter :: a(2) = t() ! { dg-error "cannot have the PARAMETER attribute" } 12 x = a ! { dg-error "Nonallocatable variable must not be polymorphic in intrinsic assignment" } 13end 14 15subroutine sub_b 16 type t 17 integer :: n 18 end type 19 class(t) :: a, x ! { dg-error "must be dummy, allocatable or pointer" } 20 x = a ! { dg-error "Nonallocatable variable must not be polymorphic in intrinsic assignment" } 21end 22