! { dg-do compile }! PR fortran/85001 ! Contributed by Gerhard Steinmetz.program p
type t
end typecall s
containsreal functionf(x)class(t) :: x
dimension::x(:)
f =1.0endsubroutine s
type(t) ::x(2)real:: z
z =f(x)! { dg-error "Rank mismatch in argument" }endend