2011-05-23 Tom de Vries <tom@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocatable_scalar_11.f90
blobb9fb1085760688c91d1ed77e82e33ad00021d3d4
1 ! { dg-do compile }
3 ! PR fortran/46484
6 function g()
7 implicit none
8 integer, allocatable :: g
9 call int()
10 print *, loc(g) ! OK
11 contains
12 subroutine int()
13 print *, loc(g) ! OK
14 print *, allocated(g) ! OK
15 end subroutine int
16 end function
18 implicit none
19 integer, allocatable :: x
20 print *, allocated(f) ! { dg-error "must be a variable" }
21 print *, loc(f) ! OK
22 contains
23 function f()
24 integer, allocatable :: f
25 print *, loc(f) ! OK
26 print *, allocated(f) ! OK
27 end function
28 end