[flang-commits] [flang] [flang][hlfir] get rid of box when translating scalars to extented value (PR #125059)
David Spickett via flang-commits
flang-commits at lists.llvm.org
Fri Jan 31 05:10:31 PST 2025
DavidSpickett wrote:
Smaller version:
```
module z
implicit none
contains
subroutine sum_2 (input, res, mask)
logical, intent(in), optional :: mask
integer, intent(in) :: input(:,:)
integer, dimension(:), intent(out) :: res
res = sum (input, dim=1, mask=mask)
end subroutine sum_2
end module z
program main
use z
implicit none
integer :: i2(2,3) = reshape([1,2,4,8,16,32], [2,3])
integer, dimension(3) :: res3
res3 = -2
call sum_2 (i2, res3)
if (any (res3 /= [3, 12, 48])) stop 2
end program main
```
https://github.com/llvm/llvm-project/pull/125059
More information about the flang-commits
mailing list