OSDN Git Service

2007-01-15 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / specification_type_resolution_2.f90
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
7 module gfcbug50
8   implicit none
9 contains
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
23 end module gfcbug50
24
25 ! { dg-final { cleanup-modules "gfcbug50" } }