-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Labels
Description
Version of flang : 20.0.0(590f451b60d434b26c634a07125fb05baf461fa0)/AArch64
Using %VAL (which specifies that the actual argument should be passed by value) for an actual argument results in a compilation error (LLVM IR failed).
The following are the test program, Flang, Gfortran and ifx compilation/execution result.
snggf047_22.f90:
program main
logical::a1
data a1/.true./
call sa(%val(a1))
write(6,*) "a1 = ", a1
end program main
subroutine sa(x1)
logical::x1
end subroutine sa$ flang snggf047_22.f90
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/MCS/v3f/snggf047_22.f90":4:3): unsupported types for logical conversion: 'i32' -> '!llvm.ptr'
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/MCS/v3f/snggf047_22.f90":4:3): failed to legalize operation 'fir.convert'
error: Lowering to LLVM IR failed
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/MCS/v3f/snggf047_22.f90":1:1): cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: func.func
error: failed to create the LLVM module
$
$ gfortran snggf047_2.f90; ./a.out
a1 = T
$
$ ifx snggf047_2.f90; ./a.out
a1 = T
$
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done