1! { dg-do compile }
2! Tests the fix for PR30283 in which the type of the result
3! of bar was getting lost
4
5! Contributed by Harald Anlauf <anlauf@gmx.de>
6
7module gfcbug50
8  implicit none
9contains
10
11  subroutine foo (n, y)
12    integer, intent(in)         :: n
13    integer, dimension(bar (n)) :: y
14    ! Array bound is specification expression, which is allowed (F2003, sect.7.1.6)
15  end subroutine foo
16
17  pure function bar (n) result (l)
18    integer, intent(in) :: n
19    integer             :: l
20    l = n
21  end function bar
22
23end module gfcbug50
24