1! { dg-do compile } 2! 3! PR 56266: [OOP] ICE on invalid in gfc_match_varspec 4! 5! Contributed by Andrew Benson <abensonca@gmail.com> 6 7module t 8 9 implicit none 10 11 type nc 12 contains 13 procedure :: encM => em 14 end type nc 15 16contains 17 18 double precision function em(self) 19 class(nc) :: self 20 em=0. 21 end function 22 23 double precision function cem(c) 24 type(nc) :: c 25 cem=c(i)%encM() ! { dg-error "Unclassifiable statement" } 26 end function 27 28end module 29