From: Siddhesh Poyarekar Date: Mon, 21 Jul 2025 01:13:20 +0000 (+0530) Subject: testsuite: Fix overflow in gcc.dg/vect/pr116125.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=156c3ee6a9095c5ec6fc10d837fe3ae2291ad8a8;p=thirdparty%2Fgcc.git testsuite: Fix overflow in gcc.dg/vect/pr116125.c 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. gcc/testsuite/ChangeLog: * gcc.dg/vect/pr116125.c (mem_overlap): Expand A to 10 members. Signed-off-by: Siddhesh Poyarekar (cherry picked from commit 96d5aef307025a771ae4ef47a9b382ef20eb06c4) --- diff --git a/gcc/testsuite/gcc.dg/vect/pr116125.c b/gcc/testsuite/gcc.dg/vect/pr116125.c index eab9efdc061..1b882ec4002 100644 --- a/gcc/testsuite/gcc.dg/vect/pr116125.c +++ b/gcc/testsuite/gcc.dg/vect/pr116125.c @@ -17,12 +17,12 @@ main (void) { check_vect (); - struct st a[9] = {}; + struct st a[10] = {}; - // input a = 0, 0, 0, 0, 0, 0, 0, 0, 0 + // input a = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 mem_overlap (&a[1], a); - // output a = 0, 1, 2, 3, 4, 5, 6, 7, 8 + // output a = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 if (a[2].num == 2) return 0; else