]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: aarch64: ensure INT*_MIN macro definitions for C++ acle asm
authorAlexandre Oliva <oliva@adacore.com>
Thu, 16 Apr 2026 04:06:19 +0000 (01:06 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 16 Apr 2026 04:55:54 +0000 (01:55 -0300)
VxWorks' libc doesn't define __STDC_LIMIT_MACROS when compiling C++98,
and then GCC's stdint.h doesn't define INT<N>_MIN, that a number of
acle asm testcases expect.  If the macro is not defined, define the
macro in the header first included by all the affected tests, namely,
{div_s{32,64},mul_s{16,32,64,8}}.c.

for  gcc/testsuite/ChangeLog

* gcc.target/aarch64/sve/acle/asm/test_sve_acle.h
(__STDC_LIMIT_MACROS): Define.

gcc/testsuite/gcc.target/aarch64/sve/acle/asm/test_sve_acle.h

index 8d4ed537c871d87622b60cca9954849077ebb1a0..aeb58ead0dd040217e682ffaf9ed973ae1ca4996 100644 (file)
@@ -1,6 +1,13 @@
 #ifndef TEST_SVE_ACLE_H
 #define TEST_SVE_ACLE_H 1
 
+/* When compiling for e.g. C++98, we won't get the INt*_MIN macros that some
+   tests want without defining this macro.  */
+
+#ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+
 #include <arm_neon_sve_bridge.h>
 
 #if defined (TEST_OVERLOADS)