PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_intent_5.f90
blobc4e3c7a3c1d037b07428d06ec301c067036b9019
1 ! { dg-do run }
3 ! PR 50570: [4.6/4.7 Regression] Incorrect error for assignment to intent(in) pointer
5 ! Contributed by Bill Long <longb@cray.com>
7 program bots_sparselu_pointer_intent_in
9 implicit none
10 integer, pointer :: array(:)
12 allocate(array(4))
13 array = 0
14 call sub(array)
15 if (sum(array)/=1) call abort
17 contains
19 subroutine sub(dummy)
20 integer, pointer, intent(in) :: dummy(:)
21 dummy(1) = 1
22 end subroutine sub
24 end program