[committed] RISC-V: Improve portability of testcases
Checks
Commit Message
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
@@ -1,5 +1,5 @@
#include <stddef.h>
-#include <stdint.h>
+#include <stdint-gcc.h>
#define N 777
new file mode 100644
@@ -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
@@ -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)