For `LDBL_MANT_DIG == 113` targets the FortranFloat128Math library is just an interface library that provides sources and compilation options to be used for building FortranRuntime - there are not extra dependencies on other libraries, so it can be a part of FortranRuntime, which helps to avoid extra linking steps in the compiler driver. Targets with __float128 support in libc will also use this path. Other targets, where the math support comes from FLANG_RUNTIME_F128_MATH_LIB, FortranFloat128Math is built as a standalone static library, and the compiler driver needs to conduct the linking. Flang APIs for COMPLEX(16) are just thin C wrappers around the C math functions. Flang uses C _Complex ABI for passing/returning COMPLEX values, so the runtime is aligned to this.
9 lines
293 B
Fortran
9 lines
293 B
Fortran
! RUN: bbc -emit-fir %s -o - | FileCheck %s
|
|
! RUN: bbc --math-runtime=precise -emit-fir %s -o - | FileCheck %s
|
|
! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck %s
|
|
|
|
! CHECK: fir.call @_FortranACLogF128({{.*}}){{.*}}: (!fir.complex<16>) -> !fir.complex<16>
|
|
complex(16) :: a, b
|
|
b = log(a)
|
|
end
|