On Fri, Jul 11, 2025 at 8:27 PM Siddhesh Poyarekar <siddh...@gotplt.org> wrote: > > The test ends up writing a byte beyond bounds of the buffer, which gets > trapped on some targets when the test is run with > -fstack-protector-strong. > > testsuite/ChangeLog: > > * gcc.dg/vect/pr116125.c (mem_overlap): Reduce iteration count > to 8. > > Signed-off-by: Siddhesh Poyarekar <siddh...@gotplt.org> > --- > OK for trunk and backport to gcc-15?
Can you instead make the buffers larger? We might otherwise no longer testing what we did. > > gcc/testsuite/gcc.dg/vect/pr116125.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/testsuite/gcc.dg/vect/pr116125.c > b/gcc/testsuite/gcc.dg/vect/pr116125.c > index eab9efdc061..2f45ac3edc1 100644 > --- a/gcc/testsuite/gcc.dg/vect/pr116125.c > +++ b/gcc/testsuite/gcc.dg/vect/pr116125.c > @@ -8,7 +8,7 @@ struct st > void __attribute__((noipa)) > mem_overlap (struct st *a, struct st *b) > { > - for (int i = 0; i < 9; i++) > + for (int i = 0; i < 8; i++) > a[i].num = b[i].num + 1; > } > > -- > 2.50.0 >