]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix -m32 gcc.target/i386/pr102464-vrndscaleph.c on RedHat.
authorRoger Sayle <roger@nextmovesoftware.com>
Mon, 1 Jul 2024 11:21:20 +0000 (12:21 +0100)
committerRoger Sayle <roger@nextmovesoftware.com>
Mon, 1 Jul 2024 11:21:20 +0000 (12:21 +0100)
This patch fixes the 4 FAILs of gcc.target/i386/pr192464-vrndscaleph.c
with --target_board='unix{-m32}' on RedHat 7.x.  The issue is that this
AVX512 test includes the system math.h, and on older systems this provides
inline versions of floor, ceil and rint (for the 387).  The work around
is to define __NO_MATH_INLINES before #include <math.h> (or alternatively
use __builtin_floor, __builtin_ceil, etc.).

2024-07-01  Roger Sayle  <roger@nextmovesoftware.com>

gcc/testsuite/ChangeLog
PR middle-end/102464
* gcc.target/i386/pr102464-vrndscaleph.c: Define __NO_MATH_INLINES
to resovle FAILs with -m32 on older RedHat systems.

gcc/testsuite/gcc.target/i386/pr102464-vrndscaleph.c

index a76d9e7e376386b230ad98c68255f0f58a39fbf3..9eb8124e3f54cbbf8cc86d8bb580d9c123dce33b 100644 (file)
@@ -1,6 +1,9 @@
 /* PR target/102464.  */
 /* { dg-do compile } */
 /* { dg-options "-Ofast -mavx512fp16 -mavx512vl -mprefer-vector-width=512" } */
+#ifndef __NO_MATH_INLINES
+#define __NO_MATH_INLINES
+#endif
 #include<math.h>
 void
 foo (_Float16* __restrict a, _Float16* b)