PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / assumed_type_1.f90
blob637b39387f040d237064b80f71fca1ba608bb37a
1 ! { dg-do compile }
3 ! PR fortran/48820
5 ! Test TYPE(*)
7 ! Based on a contributed test case by Walter Spector
9 module mpi_interface
10 implicit none
12 interface mpi_send
13 subroutine MPI_Send (buf, count, datatype, dest, tag, comm, ierr)
14 type(*), intent(in) :: buf(:)
15 integer, intent(in) :: count
16 integer, intent(in) :: datatype
17 integer, intent(in) :: dest
18 integer, intent(in) :: tag
19 integer, intent(in) :: comm
20 integer, intent(out):: ierr
21 end subroutine
22 end interface
24 interface mpi_send2
25 subroutine MPI_Send2 (buf, count, datatype, dest, tag, comm, ierr)
26 type(*), intent(in) :: buf(*)
27 integer, intent(in) :: count
28 integer, intent(in) :: datatype
29 integer, intent(in) :: dest
30 integer, intent(in) :: tag
31 integer, intent(in) :: comm
32 integer, intent(out):: ierr
33 end subroutine
34 end interface
36 end module
38 use mpi_interface
39 real :: a(3)
40 integer :: b(3)
41 call foo(a)
42 call foo(b)
43 call foo(a(1:2))
44 call foo(b(1:2))
45 call MPI_Send(a, 1, 1,1,1,j,i)
46 call MPI_Send(b, 1, 1,1,1,j,i)
47 call MPI_Send2(a, 1, 1,1,1,j,i)
48 call MPI_Send2(b, 1, 1,1,1,j,i)
49 contains
50 subroutine foo(x)
51 type(*):: x(*)
52 call MPI_Send2(x, 1, 1,1,1,j,i)
53 end
54 end