diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/interface_41.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/interface_41.f90 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/interface_41.f90 b/gcc/testsuite/gfortran.dg/interface_41.f90 new file mode 100644 index 00000000000..b5ea8af189d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/interface_41.f90 @@ -0,0 +1,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 |