OSDN Git Service

2011-09-26 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / interface_29.f90
1 ! { dg-do compile }
2 !
3 ! PR 36947: Attributes not fully checked comparing actual vs dummy procedure
4 !
5 ! Contributed by Tobias Burnus <burnus@net-b.de>
6
7 module m
8 interface foo
9   module procedure one, two
10 end interface foo
11 contains
12 subroutine one(op,op2)
13     interface
14       subroutine op(x, y)
15         complex, intent(in)  :: x(:)
16         complex, intent(out) :: y(:)
17       end subroutine op
18       subroutine op2(x, y)
19         complex, intent(in)  :: x(:)
20         complex, intent(out) :: y(:)
21       end subroutine op2
22     end interface
23 end subroutine one
24 subroutine two(ops,i,j)
25     interface
26       subroutine op(x, y)
27         complex, intent(in)  :: x(:)
28         complex, intent(out) :: y(:)
29       end subroutine op
30     end interface
31     real :: i,j
32 end subroutine two
33 end module m
34
35 module test
36 contains
37 subroutine bar()
38   use m
39   call foo(precond_prop,prop2)
40 end subroutine bar
41   subroutine precond_prop(x, y)
42     complex, intent(in)  :: x(:)
43     complex, intent(out) :: y(:)
44   end subroutine
45   subroutine prop2(x, y)
46     complex, intent(in)  :: x(:)
47     complex, intent(out) :: y(:)
48   end subroutine
49 end module test
50
51 ! { dg-final { cleanup-modules "m test" } }
52