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.
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++)
{
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++)