llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28k stars 11.56k forks source link

Flang: not yet implemented: intrinsic: REAL(KIND=2) in SPACING (used in e.g. HDF5) #83894

Open keidavis opened 6 months ago

keidavis commented 6 months ago

llvm-project/flang/include/flang/Optimizer/Support/Utils.h:131: not yet implemented: intrinsic: REAL(KIND=2) in SPACING

It seems it's not REAL(KIND=2), but the implementation for that type in the SPACING intrinsic. Looking at flang/lib/Optimizer/Builder/Runtime/Numeric.cpp, it appears that SPACING, and several other intrinsics, are implemented for larger float types.

Compiling kind_find ( https://github.com/srinathv/Coding-Examples/blob/master/codingTests/fortran90/kindfind.f90) with flang suggests that REAL(KIND=2) is at least nominally implemented.

Flang gives a sensible error message, but hoping to get this on someone's radar as much software depends on HDF5.

Thanks!

clementval commented 1 week ago

@keidavis This might solve your issue? https://github.com/llvm/llvm-project/pull/106575

llvmbot commented 1 week ago

@llvm/issue-subscribers-flang-ir

Author: Kei Davis (keidavis)

llvm-project/flang/include/flang/Optimizer/Support/Utils.h:131: not yet implemented: intrinsic: REAL(KIND=2) in SPACING It seems it's not REAL(KIND=2), but the implementation for that type in the SPACING intrinsic. Looking at flang/lib/Optimizer/Builder/Runtime/Numeric.cpp, it appears that SPACING, and several other intrinsics, are implemented for larger float types. Compiling kind_find ( https://github.com/srinathv/Coding-Examples/blob/master/codingTests/fortran90/kindfind.f90) with flang suggests that REAL(KIND=2) is at least nominally implemented. Flang gives a sensible error message, but hoping to get this on someone's radar as much software depends on HDF5. Thanks!
llvmbot commented 1 week ago

@llvm/issue-subscribers-flang-runtime

Author: Kei Davis (keidavis)

llvm-project/flang/include/flang/Optimizer/Support/Utils.h:131: not yet implemented: intrinsic: REAL(KIND=2) in SPACING It seems it's not REAL(KIND=2), but the implementation for that type in the SPACING intrinsic. Looking at flang/lib/Optimizer/Builder/Runtime/Numeric.cpp, it appears that SPACING, and several other intrinsics, are implemented for larger float types. Compiling kind_find ( https://github.com/srinathv/Coding-Examples/blob/master/codingTests/fortran90/kindfind.f90) with flang suggests that REAL(KIND=2) is at least nominally implemented. Flang gives a sensible error message, but hoping to get this on someone's radar as much software depends on HDF5. Thanks!