Consider the following reducer: ``` integer :: count = 0 type dt integer, allocatable :: i(:) end type type(dt) :: x(10) integer :: ub allocate(x(2)%i(2:3)) ub = ubound(x(foo())%i,1) !! Called twice here. if (count /= 1) error stop 5 contains integer function foo() foo = 2 count = count + 1 end function end ``` Flang called function `foo` twice when it is referenced to get the array index for `x`. The `count` should be `1`.