PR c/29467
[official-gcc.git] / gcc / testsuite / gfortran.dg / array_function_3.f90
blob3d0ee91176b4cb89748df9b2d8e7f15515dd92c6
1 ! { dg-do compile }
3 ! PR fortran/36167
4 ! This used to cause an ICE because of a missing array spec after interface
5 ! mapping.
7 ! Contributed by Frank Muldoon <fmuldoo@me.lsu.edu>
9 module communication_tools
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
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
24 return
25 end function overlap_1
27 end module communication_tools
29 !*******************************************************************************
30 subroutine write_out_particles
31 !*******************************************************************************
33 use communication_tools
34 real, dimension(1:5, 2:4, 3:10) :: vorticityMag
35 real, allocatable, dimension(:,:,:) :: temp3d
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)))
45 return
46 end subroutine write_out_particles