1! { dg-do compile } 2! { dg-options "-fcoarray=lib" } 3! Check that error message is presented as long as polymorphic coarrays are 4! not implemented. 5 6module maccscal 7 type t 8 real, allocatable :: a 9 end type 10contains 11 subroutine s(x) ! { dg-error "Sorry, allocatable/pointer components in polymorphic \\(CLASS\\)" } 12 class(t) :: x[*] 13 allocate (x%a) 14 end 15end 16module mptrscal 17 type t 18 real, pointer :: a 19 end type 20contains 21 subroutine s(x) ! { dg-error "Sorry, allocatable/pointer components in polymorphic \\(CLASS\\)" } 22 class(t) :: x[*] 23 allocate (x%a) 24 end 25end 26module mallarr 27 type t 28 real, allocatable :: a(:) 29 end type 30contains 31 subroutine s(x) ! { dg-error "Sorry, allocatable/pointer components in polymorphic \\(CLASS\\)" } 32 class(t) :: x[*] 33 allocate (x%a(2)) 34 end 35end 36module mptrarr 37 type t 38 real, pointer :: a(:) 39 end type 40contains 41 subroutine s(x) ! { dg-error "Sorry, allocatable/pointer components in polymorphic \\(CLASS\\)" } 42 class(t) :: x[*] 43 allocate (x%a(2)) 44 end 45end 46