1! { dg-do compile } 2! { dg-additional-options "-march=core-avx2" { target x86_64-*-* i?86-*-* } } 3 4 subroutine foo 5 6 integer :: a, b, c, d, e 7 8 integer, dimension(:), allocatable :: f, g, h 9 10 call zoo (a) 11 call zoo (b) 12 call zoo (c) 13 14 if(a == b) then 15 allocate(g(0:d-1), h(0:d-1)) 16 else 17 allocate(g(1), h(1)) 18 if (b /= 0) then 19 call zoo(b) 20 endif 21 endif 22 23 if(a == b) then 24 do d=0,c-1 25 e = e + g(d) 26 if(d == 0) then 27 h(d) = 0 28 else 29 h(d) = h(d-1) + g(d-1) 30 endif 31 end do 32 endif 33 34 if(a == b) then 35 allocate(f(e), g(e)) 36 endif 37 38 if(a == 0) then 39 call boo(e) 40 endif 41 42 end subroutine foo 43