Consider the following reducer:
program main
double precision, target :: tar2(100)
double precision, pointer :: ptr(:,:,:)
i = -2
call sub (i)
contains
function set_bd(i)
integer i, set_bd
allocatable set_bd
allocate(set_bd, source = i)
end function
subroutine sub(i)
integer i
ptr(i:i-1, 1:set_bd(0), int(3.2):i) => tar2
print*, lbound(ptr)
print*, ubound(ptr)
end subroutine
End program
Flang outpus
The expected output should be
All ifort, gfortran and XLF produces the correct result.