[gcc r16-3919] i386/testsuite: Correct res_ref2 array size for avx512bw-vpmov{, us}wb-2.c
Haochen Jiang
jianghc@gcc.gnu.org
Wed Sep 17 03:03:56 GMT 2025
https://gcc.gnu.org/g:39c7b08d4ea33254c74ac0d2d7c2420ab1cb7f98
commit r16-3919-g39c7b08d4ea33254c74ac0d2d7c2420ab1cb7f98
Author: Haochen Jiang <haochen.jiang@intel.com>
Date: Tue Sep 16 14:40:12 2025 +0800
i386/testsuite: Correct res_ref2 array size for avx512bw-vpmov{,us}wb-2.c
Both of the tests under 128 bit are raising:
warning: writing 16 bytes into a region of size 8 [-Wstringop-overflow=]
when compiling, leading to a test fail. The warning is caused by the
incorrect array size for res_ref2. The wrong size caused the overflow.
Correct them in this patch to fix the test fail.
gcc/testsuite/ChangeLog:
* gcc.target/i386/avx512bw-vpmovuswb-2.c: Correct res_ref2
array size.
* gcc.target/i386/avx512bw-vpmovwb-2.c: Ditto.
Diff:
---
gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-2.c | 2 +-
gcc/testsuite/gcc.target/i386/avx512bw-vpmovwb-2.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-2.c
index d5198f39eb61..2311dfea34f5 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-2.c
@@ -27,7 +27,7 @@ TEST (void)
UNION_TYPE (AVX512F_LEN, i_w) src;
MASK_TYPE mask = MASK_VALUE;
unsigned char res_ref[32];
- unsigned char res_ref2[SIZE];
+ unsigned char res_ref2[SIZE_HALF];
for (i = 0; i < SIZE; i++)
{
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovwb-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovwb-2.c
index 6b0f86f57d8c..ea91181284f2 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovwb-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovwb-2.c
@@ -28,7 +28,7 @@ TEST (void)
UNION_TYPE (AVX512F_LEN, i_w) src;
MASK_TYPE mask = MASK_VALUE;
char res_ref[32];
- char res_ref2[SIZE];
+ char res_ref2[SIZE_HALF];
sign = -1;
for (i = 0; i < SIZE; i++)
More information about the Gcc-cvs
mailing list