Debian Codegraph @

gcc/testsuite/gfortran.dg/pointer_intent_5.f90

raw
1 ! { dg-do run }
2 !
3 ! PR 50570: [4.6/4.7 Regression] Incorrect error for assignment to intent(in) pointer
4 !
5 ! Contributed by Bill Long <[email protected]>
6
7 program bots_sparselu_pointer_intent_in
8
9 implicit none
10 integer, pointer :: array(:)
11
12 allocate(array(4))
13 array = 0
14 call sub(array)
15 if (sum(array)/=1) STOP 1
16
17 contains
18
19 subroutine sub(dummy)
20 integer, pointer, intent(in) :: dummy(:)
21 dummy(1) = 1
22 end subroutine sub
23
24 end program