[flang][runtime] Fixed flang+Werror buildbots after #83169.

This commit is contained in:
Slava Zakharin
2024-02-27 18:33:43 -08:00
parent 91d23370cd
commit 1f2a1a72ae
3 changed files with 9 additions and 4 deletions

View File

@@ -54,9 +54,13 @@
/* Define pure C CFloat128Type and CFloat128ComplexType. */
#if LDBL_MANT_DIG == 113
typedef long double CFloat128Type;
#ifndef __cplusplus
typedef long double _Complex CFloat128ComplexType;
#endif
#elif HAS_FLOAT128
typedef __float128 CFloat128Type;
#ifndef __cplusplus
/*
* Use mode() attribute supported by GCC and Clang.
* Adjust it for other compilers as needed.
@@ -66,5 +70,6 @@ typedef _Complex float __attribute__((mode(TC))) CFloat128ComplexType;
#else
typedef _Complex float __attribute__((mode(KC))) CFloat128ComplexType;
#endif
#endif // __cplusplus
#endif
#endif /* FORTRAN_COMMON_FLOAT128_H_ */

View File

@@ -10,13 +10,15 @@
namespace Fortran::runtime {
extern "C" {
#if 0
// FIXME: temporarily disabled. Need to add pure C entry point
// using C _Complex ABI.
#if LDBL_MANT_DIG == 113 || HAS_FLOAT128
// NOTE: Flang calls the runtime APIs using C _Complex ABI
CppTypeFor<TypeCategory::Real, 16> RTDEF(CAbsF128)(CFloat128ComplexType x) {
return CAbs<RTNAME(CAbsF128)>::invoke(x);
}
#endif
#endif
} // extern "C"
} // namespace Fortran::runtime

View File

@@ -61,7 +61,6 @@ DEFINE_FALLBACK(Asinh)
DEFINE_FALLBACK(Atan)
DEFINE_FALLBACK(Atan2)
DEFINE_FALLBACK(Atanh)
DEFINE_FALLBACK(CAbs)
DEFINE_FALLBACK(Ceil)
DEFINE_FALLBACK(Cos)
DEFINE_FALLBACK(Cosh)
@@ -163,7 +162,6 @@ DEFINE_SIMPLE_ALIAS(Asinh, asinhq)
DEFINE_SIMPLE_ALIAS(Atan, atanq)
DEFINE_SIMPLE_ALIAS(Atan2, atan2q)
DEFINE_SIMPLE_ALIAS(Atanh, atanhq)
DEFINE_SIMPLE_ALIAS(CAbs, cabsq)
DEFINE_SIMPLE_ALIAS(Ceil, ceilq)
DEFINE_SIMPLE_ALIAS(Cos, cosq)
DEFINE_SIMPLE_ALIAS(Cosh, coshq)