[flang-commits] [flang] [Flang] Fix handling of unlimited polymorphic arrays (PR #159624)
via flang-commits
flang-commits at lists.llvm.org
Fri Sep 19 08:22:13 PDT 2025
https://github.com/jeanPerier commented:
Thanks @ceseo, while your fix makes some sense, I think this case is not well specified enough for us to implement.
What is the expected behavior of:
```
module m1
contains
subroutine s1(u,v)
logical::mask(3)=[.true.,.false.,.true.]
class(*),allocatable::v(:),u(:)
where(mask)
u=v
end where
end subroutine s1
end module m1
program main
use m1
class(*),allocatable::v(:),u(:)
v = [1.,2.,3.]
u = [0, 0, 0]
call s1(u,v)
select type (u)
type is (real)
print *, "real", u
type is (integer)
print *, "integer", u
end select
end program main
```
IFX and gfortran do not agree: https://godbolt.org/z/h14dsMP36
https://github.com/llvm/llvm-project/pull/159624
More information about the flang-commits
mailing list