]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386/testsuite: Correct res_ref2 array size for avx512bw-vpmov{,us}wb-2.c
authorHaochen Jiang <haochen.jiang@intel.com>
Tue, 16 Sep 2025 06:40:12 +0000 (14:40 +0800)
committerHaochen Jiang <haochen.jiang@intel.com>
Wed, 17 Sep 2025 03:03:34 +0000 (11:03 +0800)
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.

gcc/testsuite/gcc.target/i386/avx512bw-vpmovuswb-2.c
gcc/testsuite/gcc.target/i386/avx512bw-vpmovwb-2.c

index d5198f39eb613d31e07d5a02d9d8d6f106179713..2311dfea34f51353620dacafe2495d1a26f3a609 100644 (file)
@@ -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++)
     {
index 6b0f86f57d8c0a156d1a7bedacaa6544dbd9e2cd..ea91181284f22ad0709655257cc6d3a577647227 100644 (file)
@@ -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++)