Skip to content

Commit 1f2a1a7

Browse files
committed
[flang][runtime] Fixed flang+Werror buildbots after #83169.
1 parent 91d2337 commit 1f2a1a7

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

flang/include/flang/Common/float128.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@
5454
/* Define pure C CFloat128Type and CFloat128ComplexType. */
5555
#if LDBL_MANT_DIG == 113
5656
typedef long double CFloat128Type;
57+
#ifndef __cplusplus
5758
typedef long double _Complex CFloat128ComplexType;
59+
#endif
5860
#elif HAS_FLOAT128
5961
typedef __float128 CFloat128Type;
62+
63+
#ifndef __cplusplus
6064
/*
6165
* Use mode() attribute supported by GCC and Clang.
6266
* Adjust it for other compilers as needed.
@@ -66,5 +70,6 @@ typedef _Complex float __attribute__((mode(TC))) CFloat128ComplexType;
6670
#else
6771
typedef _Complex float __attribute__((mode(KC))) CFloat128ComplexType;
6872
#endif
73+
#endif // __cplusplus
6974
#endif
7075
#endif /* FORTRAN_COMMON_FLOAT128_H_ */

flang/runtime/Float128Math/cabs.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010

1111
namespace Fortran::runtime {
1212
extern "C" {
13-
13+
#if 0
14+
// FIXME: temporarily disabled. Need to add pure C entry point
15+
// using C _Complex ABI.
1416
#if LDBL_MANT_DIG == 113 || HAS_FLOAT128
1517
// NOTE: Flang calls the runtime APIs using C _Complex ABI
1618
CppTypeFor<TypeCategory::Real, 16> RTDEF(CAbsF128)(CFloat128ComplexType x) {
1719
return CAbs<RTNAME(CAbsF128)>::invoke(x);
1820
}
1921
#endif
20-
22+
#endif
2123
} // extern "C"
2224
} // namespace Fortran::runtime

flang/runtime/Float128Math/math-entries.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ DEFINE_FALLBACK(Asinh)
6161
DEFINE_FALLBACK(Atan)
6262
DEFINE_FALLBACK(Atan2)
6363
DEFINE_FALLBACK(Atanh)
64-
DEFINE_FALLBACK(CAbs)
6564
DEFINE_FALLBACK(Ceil)
6665
DEFINE_FALLBACK(Cos)
6766
DEFINE_FALLBACK(Cosh)
@@ -163,7 +162,6 @@ DEFINE_SIMPLE_ALIAS(Asinh, asinhq)
163162
DEFINE_SIMPLE_ALIAS(Atan, atanq)
164163
DEFINE_SIMPLE_ALIAS(Atan2, atan2q)
165164
DEFINE_SIMPLE_ALIAS(Atanh, atanhq)
166-
DEFINE_SIMPLE_ALIAS(CAbs, cabsq)
167165
DEFINE_SIMPLE_ALIAS(Ceil, ceilq)
168166
DEFINE_SIMPLE_ALIAS(Cos, cosq)
169167
DEFINE_SIMPLE_ALIAS(Cosh, coshq)

0 commit comments

Comments
 (0)