Skip to content

Commit

Permalink
[flang] Fixed build issues after f20ea05. (llvm#84377)
Browse files Browse the repository at this point in the history
Older versions of clang do not have __builtin_complex, but they
may define `__GNUC__`.
  • Loading branch information
vzakhari authored Mar 8, 2024
1 parent 3846019 commit d9c8550
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flang/runtime/complex-reduction.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ static long_double_Complex_t CMPLXL(long double r, long double i) {
* supports __builtin_complex. For Clang, require >=12.0.
* Otherwise, rely on the memory layout compatibility.
*/
#if (defined(__clang_major__) && (__clang_major__ >= 12)) || defined(__GNUC__)
#if (defined(__clang_major__) && (__clang_major__ >= 12)) || \
(defined(__GNUC__) && !defined(__clang__))
#define CMPLXF128 __builtin_complex
#else
static CFloat128ComplexType CMPLXF128(CFloat128Type r, CFloat128Type i) {
Expand Down

0 comments on commit d9c8550

Please sign in to comment.