2016-01-15 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / associated_4.f90
blobdd4490b827cb7ef71a31e012c304ed3f90133690
1 ! { dg-do run }
2 ! PR fortran/26801
3 implicit none
5 integer :: i
6 integer,target :: u
7 logical :: l
8 character(len=8) :: A
9 type dt
10 integer, pointer :: a => NULL()
11 end type dt
12 type(dt) :: obj(2)
14 i = 2
15 l = associated(obj(i)%a)
16 write(A,*) l
17 l = associated(obj(i)%a,u)
18 print *, l
19 write(A,*) l
20 end