https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116215
Bug ID: 116215 Summary: -Wstringop-overflow in i386-expand.cc Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Created attachment 58813 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58813&action=edit i386-expand.ii.xz ``` $ gcc -c i386-expand.ii -O3 -Werror=stringop-overflow /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/config/i386/i386-expand.cc: In function ‘bool expand_vec_perm_interleave2(expand_vec_perm_d*)’: /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/config/i386/i386-expand.cc:21384:38: error: writing 16 bytes into a region of size 8 [-Werror=stringop-overflow=] 21384 | dremap.perm[i + nelt2] = i + nonzero_halves[1] * nelt2; | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/config/i386/i386-expand.cc:21179:28: note: at offset [88, 96] into destination object ‘dremap’ of size 96 21179 | struct expand_vec_perm_d dremap, dfinal; | ^~~~~~ /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/config/i386/i386-expand.cc:21327:38: error: writing 16 bytes into a region of size 8 [-Werror=stringop-overflow=] 21327 | dremap.perm[i + nelt2] = i + nelt; | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/config/i386/i386-expand.cc:21179:28: note: at offset [88, 96] into destination object ‘dremap’ of size 96 21179 | struct expand_vec_perm_d dremap, dfinal; | ^~~~~~ /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/config/i386/i386-expand.cc:21308:38: error: writing 16 bytes into a region of size 8 [-Werror=stringop-overflow=] 21308 | dremap.perm[i + nelt2] = i + nelt + nelt2; | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/config/i386/i386-expand.cc:21179:28: note: at offset [88, 96] into destination object ‘dremap’ of size 96 21179 | struct expand_vec_perm_d dremap, dfinal; | ^~~~~~ /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/config/i386/i386-expand.cc: In function ‘bool expand_vec_perm_punpckldq_pshuf(expand_vec_perm_d*)’: /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/config/i386/i386-expand.cc:20940:32: error: writing 16 bytes into a region of size 8 [-Werror=stringop-overflow=] 20940 | dperm.perm[i + nelt / 2] = d->perm[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/config/i386/i386-expand.cc:20925:28: note: at offset [88, 96] into destination object ‘dperm’ of size 96 20925 | struct expand_vec_perm_d dperm; | ^~~~~ [...] ```