]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Improve portability of testcases
authorKito Cheng <kito.cheng@sifive.com>
Mon, 8 May 2023 13:44:30 +0000 (21:44 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Mon, 8 May 2023 14:37:05 +0000 (22:37 +0800)
stdint.h will require having corresponding multi-lib existing, so using
stdint-gcc.h instead, also added a riscv_vector.h wrapper to
gcc.target/riscv/rvv/autovec/.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h: Change
stdint.h to stdint-gcc.h.
* gcc.target/riscv/rvv/autovec/template-1.h: Ditto.
* gcc.target/riscv/rvv/autovec/riscv_vector.h: New.

gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h
gcc/testsuite/gcc.target/riscv/rvv/autovec/riscv_vector.h [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/template-1.h

index be6b4c641cbbeab43432e73445dba056f10dd793..f64799d4e2a9d1b37e4f0372f939f110e63cc3be 100644 (file)
@@ -1,5 +1,5 @@
 #include <stddef.h>
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define N 777
 
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/riscv_vector.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/riscv_vector.h
new file mode 100644 (file)
index 0000000..fbb4858
--- /dev/null
@@ -0,0 +1,11 @@
+/* Wrapper of riscv_vector.h, prevent riscv_vector.h including stdint.h from
+   C library, that might cause problem on testing RV32 related testcase when
+   we disable multilib.  */
+#ifndef _RISCV_VECTOR_WRAP_H
+
+#define _GCC_WRAP_STDINT_H
+#include "stdint-gcc.h"
+#include_next <riscv_vector.h>
+#define _RISCV_VECTOR_WRAP_H
+
+#endif
index 799e2d7d75421e44ac63d4984a2352da83339760..074952f21d5f1803b594d4cc40140af88b8f415f 100644 (file)
@@ -1,5 +1,5 @@
 #include <stddef.h>
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 void
 foo0 (int8_t *__restrict f, int16_t *__restrict d, int n)