2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / specification_type_resolution_2.f90
blobf87cd11b0b1219eb19ad852b73b87f4128095f66
1 ! { dg-do compile }
2 ! Tests the fix for PR30283 in which the type of the result
3 ! of bar was getting lost
5 ! Contributed by Harald Anlauf <anlauf@gmx.de>
7 module gfcbug50
8 implicit none
9 contains
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
17 pure function bar (n) result (l)
18 integer, intent(in) :: n
19 integer :: l
20 l = n
21 end function bar
23 end module gfcbug50