Incorrect information when the type-spec for the dimension of the function result contains the UBOUND intrinsic.
wanbinchen-hnc opened this issue · 2 comments
wanbinchen-hnc commented
This test case is extended from gfortran.dg/pr69739.f90
program p
implicit none
integer :: x(2,3,4)
integer, allocatable :: y(:)
y = foo(x)
print *, size(y)
contains
function foo(a)
integer :: a(:, :, :)
integer :: foo(1:product(ubound(a)))
print *, size(foo)
foo = 1
end function
end program
gfortran output:
24
24
flang output:
0
0
wanbinchen-hnc commented
PR #1422 fixes this issue, please have a look.