(root)/
gcc-13.2.0/
gcc/
testsuite/
gfortran.dg/
pr81889.f90
! { dg-do compile }
! { dg-options "-O3 -Wall" }

module m

   type t
      integer, dimension(:), pointer :: list
   end type

contains

   subroutine s(n, p, Y)
      integer, intent(in) :: n
      type(t) :: p
      real, dimension(:) :: Y

      real, dimension(1:16) :: xx

      if (n > 3) then
         xx(1:n) = 0.
         print *, xx(1:n)
      else
         xx(1:n) = Y(p%list(1:n)) ! { dg-bogus "uninitialized" }
         print *, sum(xx(1:n))
      end if

   end subroutine

end module