1! { dg-do run }
2!
3! Test the fix for PR87336, in which the 'span' field of the array
4! descriptor, passed to 'show', was not set.
5!
6! Contributed by Juergen Reuter  <juergen.reuter@desy.de> following
7! a posting to clf by 'Spectrum'.
8!
9program main
10  implicit none
11  integer, target :: a( 2:4 )
12
13  a = [2,3,4]
14!  print *, "a [before] = ", a
15  call show( a )
16!  print *, "a [after]  = ", a
17  if (any (a .ne. [200,300,400])) stop 1
18
19contains
20  subroutine show( arr )
21    integer, pointer, intent(in) :: arr(:)
22!    print *, "arr = ", arr
23!    print *, "bounds = ", lbound(arr), ubound(arr)
24    arr(:) = [200,300,400]
25!    print *, "arr2= ", arr
26  end subroutine show
27  end program
28