https://gcc.gnu.org/g:96d5aef307025a771ae4ef47a9b382ef20eb06c4

commit r16-2434-g96d5aef307025a771ae4ef47a9b382ef20eb06c4
Author: Siddhesh Poyarekar <siddh...@gotplt.org>
Date:   Mon Jul 21 06:43:20 2025 +0530

    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 <siddh...@gotplt.org>

Diff:
---
 gcc/testsuite/gcc.dg/vect/pr116125.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/pr116125.c 
b/gcc/testsuite/gcc.dg/vect/pr116125.c
index eab9efdc061b..1b882ec4002b 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

Reply via email to