PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_intent_5.f90
blobd873c5b3ce237847a0b7f0e5886d169eb26d256a
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) STOP 1
17 contains
19 subroutine sub(dummy)
20 integer, pointer, intent(in) :: dummy(:)
21 dummy(1) = 1
22 end subroutine sub
24 end program