aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/interface_41.f90
blob: b5ea8af189d3ec178ad00dea0ee9ea6a6660b5d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
! PR fortran/85001 
! Contributed by Gerhard Steinmetz.
program p
   type t
   end type
   call s
contains
   real function f(x)
      class(t) :: x
      dimension :: x(:)
      f = 1.0
   end
   subroutine s
      type(t) :: x(2)
      real :: z
      z = f(x)     ! { dg-error "Rank mismatch in argument" }
   end
end