OSDN Git Service

PR testsuite/51875
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / array_function_3.f90
1 ! { dg-do compile }
2
3 ! PR fortran/36167
4 ! This used to cause an ICE because of a missing array spec after interface
5 ! mapping.
6
7 ! Contributed by Frank Muldoon <fmuldoo@me.lsu.edu>
8
9 module communication_tools
10
11 contains   
12 !*******************************************************************************
13 function overlap_1(u,lbound_u,ubound_u)
14 !*******************************************************************************
15 integer, intent(in), dimension(:) :: lbound_u,ubound_u
16 real, intent(in), dimension(lbound_u(1):ubound_u(1),lbound_u(2):ubound_u(2),&
17                             lbound_u(3):ubound_u(3)) :: u
18
19 real, dimension(&
20 lbound(u,1):ubound(u,1),&
21 lbound(u,2):ubound(u,2),&
22 lbound(u,3):ubound(u,3)) :: overlap_1
23
24 return
25 end function overlap_1
26
27 end module communication_tools
28
29 !*******************************************************************************
30 subroutine write_out_particles
31 !*******************************************************************************
32
33 use communication_tools
34 real, dimension(1:5, 2:4, 3:10) :: vorticityMag
35 real, allocatable, dimension(:,:,:) :: temp3d
36
37 allocate(temp3d( &
38 lbound(overlap_1(vorticityMag,lbound(vorticityMag),ubound(vorticityMag)),1):&
39 ubound(overlap_1(vorticityMag,lbound(vorticityMag),ubound(vorticityMag)),1),&
40 lbound(overlap_1(vorticityMag,lbound(vorticityMag),ubound(vorticityMag)),2):&
41 ubound(overlap_1(vorticityMag,lbound(vorticityMag),ubound(vorticityMag)),2),&
42 lbound(overlap_1(vorticityMag,lbound(vorticityMag),ubound(vorticityMag)),3):&
43 ubound(overlap_1(vorticityMag,lbound(vorticityMag),ubound(vorticityMag)),3)))
44
45 return 
46 end subroutine write_out_particles
47
48 ! { dg-final { cleanup-modules "communication_tools" } }