1! { dg-do compile }
2! PR fortran/85687
3! Code original contributed by Gerhard Steinmetz gscfq at t-oline dot de
4program p
5   type t
6   end type
7   print *, rank(t)  ! { dg-error "must be a data object" }
8end
9