1! { dg-do compile }
2! { dg-options "-O3 -Wall" }
3
4module m
5
6   type t
7      integer, dimension(:), pointer :: list
8   end type
9
10contains
11
12   subroutine s(n, p, Y)
13      integer, intent(in) :: n
14      type(t) :: p
15      real, dimension(:) :: Y
16
17      real, dimension(1:16) :: xx
18
19      if (n > 3) then
20         xx(1:n) = 0.
21         print *, xx(1:n)
22      else
23         xx(1:n) = Y(p%list(1:n)) ! { dg-bogus "uninitialized" }
24         print *, sum(xx(1:n))
25      end if
26
27   end subroutine
28
29end module
30