From: Haochen Jiang Date: Tue, 16 Sep 2025 06:40:12 +0000 (+0800) Subject: i386/testsuite: Correct res_ref2 array size for avx512bw-vpmov{,us}wb-2.c X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=39c7b08d4ea33254c74ac0d2d7c2420ab1cb7f98;p=thirdparty%2Fgcc.git 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 --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-2.c index d5198f39eb6..2311dfea34f 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 6b0f86f57d8..ea91181284f 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++)