tree-optimization/113385 - wrong loop father with early exit vectorization
[official-gcc.git] / gcc / testsuite / gfortran.dg / PR100094.f90
blobf2f7f1631dcf60adb0035a9adf210ece4069efb0
1 ! { dg-do run }
3 ! Test the fix for PR100094
6 program foo_p
8 implicit none
10 integer, parameter :: n = 11
12 integer, pointer :: pout(:)
13 integer, target :: a(n)
14 integer :: i
16 a = [(i, i=1,n)]
17 call foo(pout)
18 if(.not.associated(pout)) stop 1
19 if(.not.associated(pout, a)) stop 2
20 if(any(pout/=a)) stop 3
21 stop
23 contains
25 subroutine foo(that)
26 integer, pointer, intent(out) :: that(..)
28 select rank(that)
29 rank(1)
30 that => a
31 rank default
32 stop 4
33 end select
34 return
35 end subroutine foo
37 end program foo_p