You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version of flang : 21.0.0(b2b3cb5f76f15d38e67f70124d275a5696bfdb83)/AArch64
When arrays declared as unlimited polymorphic are used in where construct, a compilation error occurs.
When where construct is removed, the compilation succeeds.
The following are the test program, Flang, Gfortran and ifx compilation/execution result.
sngg322r_2.f90:
module m1
type x
end type x
logical,parameter::t=.true.,f=.false.logical::mask(3)=[t,f,t]
end module m1
subroutines1
use m1
class(*),allocatable::v(:),u(:)
allocate(x::v(3))
allocate(x::u(3))
where(mask)
u=v
end whereendsubroutine s1program main
call s1
print*,'pass'end program main
$ flang sngg322r_2.f90
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/FFE_2022_PH19703_23/sngg322r_2.f90":14:6): 'fir.store' op operand #1 must be any reference, but got '!fir.class<none>'
error: Lowering to LLVM IR failed
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/FFE_2022_PH19703_23/sngg322r_2.f90":1:1): LLVM Translation failed for operation: fir.global
error: failed to create the LLVM module
$
$ gfortran sngg322r_2.f90; ./a.out
pass
$
$ ifx sngg322r_2.f90; ./a.out
pass
$
The text was updated successfully, but these errors were encountered:
```
Version of flang : 21.0.0(b2b3cb5)/AArch64
```
When arrays declared as `unlimited polymorphic` are used in `where construct`, a compilation error occurs.
When `where construct` is removed, the compilation succeeds.
The following are the test program, Flang, Gfortran and ifx compilation/execution result.
sngg322r_2.f90:
module m1
type x
end type x
logical,parameter::t=.true.,f=.false.logical::mask(3)=[t,f,t]
end module m1
subroutines1
use m1
class(*),allocatable::v(:),u(:)
allocate(x::v(3))
allocate(x::u(3))
where(mask)
u=v
end whereendsubroutine s1program main
call s1
print*,'pass'end program main
$ flang sngg322r_2.f90
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/FFE_2022_PH19703_23/sngg322r_2.f90":14:6): 'fir.store' op operand #<!-- -->1 must be any reference, but got '!fir.class<none>'
error: Lowering to LLVM IR failed
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/FFE_2022_PH19703_23/sngg322r_2.f90":1:1): LLVM Translation failed for operation: fir.global
error: failed to create the LLVM module
$
When arrays declared as
unlimited polymorphic
are used inwhere construct
, a compilation error occurs.When
where construct
is removed, the compilation succeeds.The following are the test program, Flang, Gfortran and ifx compilation/execution result.
sngg322r_2.f90:
The text was updated successfully, but these errors were encountered: