Tested on x86_64,aarch64-linux (one progression on aarch64) and on
x86_64-darwin, OK for trunk?
thanks,
Iain
--- 8< ---
These were failing on build on any non-x86 platform because of the
unconditional inclusion <immintrin.h>. Additionaly the bfloat16
cases were behind HAVE_BFmode which is not a define available to the
testsuite. Use a compiler pre-define for this.
gcc/testsuite/ChangeLog:
* jit.dg/test-types.c: Remove unneeded header, gate bfloat16
tests on an compiler pre-define that is present when it is
supported.
Signed-off-by: Iain Sandoe <[email protected]>
---
gcc/testsuite/jit.dg/test-types.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/jit.dg/test-types.c
b/gcc/testsuite/jit.dg/test-types.c
index e5c2b77112c..bd59c11deb9 100644
--- a/gcc/testsuite/jit.dg/test-types.c
+++ b/gcc/testsuite/jit.dg/test-types.c
@@ -1,4 +1,3 @@
-#include <immintrin.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
@@ -521,8 +520,8 @@ verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
CHECK_VALUE (gcc_jit_type_get_size (gcc_jit_context_get_type (ctxt,
GCC_JIT_TYPE_FLOAT)), sizeof (float));
CHECK_VALUE (gcc_jit_type_get_size (gcc_jit_context_get_type (ctxt,
GCC_JIT_TYPE_DOUBLE)), sizeof (double));
-#ifdef HAVE_BFmode
- CHECK_VALUE (gcc_jit_type_get_size (gcc_jit_context_get_type (ctxt,
GCC_JIT_TYPE_BFLOAT16)), sizeof (__bfloat16));
+#ifdef __BFLT16_MANT_DIG__
+ CHECK_VALUE (gcc_jit_type_get_size (gcc_jit_context_get_type (ctxt,
GCC_JIT_TYPE_BFLOAT16)), sizeof (__bf16));
#endif
gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
--
2.50.1 (Apple Git-155)