AArch64: correct constraint on Upl early clobber alternatives
[official-gcc.git] / gcc / testsuite / gfortran.dg / subref_array_pointer_3.f90
blobb345c9d6bfe212552f6f8abd3c8c963d99c079d8
1 ! { dg-do compile }
2 ! Tests the fix for PR35470, in which the pointer assignment would fail
3 ! because the assumed size 'arr' would get mixed up with the component
4 ! 'p' in the check for the upper bound of an assumed size array.
6 ! Contributed by Antony Lewis <antony@cosmologist.info>
8 subroutine sub(arr)
9 type real_pointer
10 real, pointer :: p(:)
11 end type real_pointer
12 type(real_pointer), dimension(*) :: arr
13 real, pointer :: p(:)
14 p => arr(1)%p
15 end subroutine