public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] RISC-V: Improve portability of testcases
@ 2023-05-08 14:38 Kito Cheng
  0 siblings, 0 replies; only message in thread
From: Kito Cheng @ 2023-05-08 14:38 UTC (permalink / raw)
  To: gcc-patches, kito.cheng; +Cc: Kito Cheng

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.
---
 .../riscv/rvv/autovec/partial/single_rgroup-1.h       |  2 +-
 .../gcc.target/riscv/rvv/autovec/riscv_vector.h       | 11 +++++++++++
 .../gcc.target/riscv/rvv/autovec/template-1.h         |  2 +-
 3 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/riscv_vector.h

diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h
index be6b4c641cbb..f64799d4e2a9 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.h
@@ -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
index 000000000000..fbb4858fc867
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/riscv_vector.h
@@ -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
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/template-1.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/template-1.h
index 799e2d7d7542..074952f21d5f 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/template-1.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/template-1.h
@@ -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)
-- 
2.39.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-08 14:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-08 14:38 [committed] RISC-V: Improve portability of testcases Kito Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).