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