[flang] Issue with coarray lowering
(I realize that coarray lowering is at a very experimental stage, but I noticed the issue and wanted to document it.)
Compiling https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/regression/pr71706.f90
By default, error on line 8:
$ flang -c -fcoarray pr71706.f90
warning: Support for multi image Fortran features is still experimental and in development.
error: loc(".../pr71706.f90":8:3): 'fir.rebox' op op input and output element types must match for intrinsic types
error: verification of lowering to FIR failed
Compiling with -fdefault-integer-8 (as pr71706.f90 requires) results in error on line 7:
$ flang -c -fcoarray -fdefault-integer-8 /home/eepshteyn/src/pgi/ta/tests/gfortran/tests/gfortran.dg/pr71706.f90
warning: Support for multi image Fortran features is still experimental and in development.
error: loc(".../pr71706.f90":7:3): 'fir.rebox' op op input and output element types must match for intrinsic types
error: verification of lowering to FIR failed
It seems that lowering should emit proper type conversions, like for other intrinsic functions.
flang version:
flang version 22.0.0git (https://github.com/llvm/llvm-project ad9d551e5568e155005e569a0c9527b6e45c92b8)
Target: x86_64-unknown-linux-gnu
Thread model: posix
@llvm/issue-subscribers-bug
Author: Eugene Epshteyn (eugeneepshteyn)
Compiling https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/regression/pr71706.f90
By default, error on line 8:
$ flang -c -fcoarray pr71706.f90
warning: Support for multi image Fortran features is still experimental and in development.
error: loc(".../pr71706.f90":8:3): 'fir.rebox' op op input and output element types must match for intrinsic types
error: verification of lowering to FIR failed
Compiling with -fdefault-integer-8 (as pr71706.f90 requires) results in error on line 7:
$ flang -c -fcoarray -fdefault-integer-8 /home/eepshteyn/src/pgi/ta/tests/gfortran/tests/gfortran.dg/pr71706.f90
warning: Support for multi image Fortran features is still experimental and in development.
error: loc(".../pr71706.f90":7:3): 'fir.rebox' op op input and output element types must match for intrinsic types
error: verification of lowering to FIR failed
It seems that lowering should emit proper type conversions, like for other intrinsic functions.
flang version:
flang version 22.0.0git (https://github.com/llvm/llvm-project ad9d551e5568e155005e569a0c9527b6e45c92b8)
Target: x86_64-unknown-linux-gnu
Thread model: posix
@llvm/issue-subscribers-flang-ir
Author: Eugene Epshteyn (eugeneepshteyn)
Compiling https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/regression/pr71706.f90
By default, error on line 8:
$ flang -c -fcoarray pr71706.f90
warning: Support for multi image Fortran features is still experimental and in development.
error: loc(".../pr71706.f90":8:3): 'fir.rebox' op op input and output element types must match for intrinsic types
error: verification of lowering to FIR failed
Compiling with -fdefault-integer-8 (as pr71706.f90 requires) results in error on line 7:
$ flang -c -fcoarray -fdefault-integer-8 /home/eepshteyn/src/pgi/ta/tests/gfortran/tests/gfortran.dg/pr71706.f90
warning: Support for multi image Fortran features is still experimental and in development.
error: loc(".../pr71706.f90":7:3): 'fir.rebox' op op input and output element types must match for intrinsic types
error: verification of lowering to FIR failed
It seems that lowering should emit proper type conversions, like for other intrinsic functions.
flang version:
flang version 22.0.0git (https://github.com/llvm/llvm-project ad9d551e5568e155005e569a0c9527b6e45c92b8)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Hi @eugeneepshteyn, thanks for the issue! I'll take a look on that point.