Just some uninitialized arrays causing maybe garbage as input here.
So let's clear the arrays before the use.

Pushed as obvious after testing the testcase still works.

        PR testsuite/127587

gcc/testsuite/ChangeLog:

        * gcc.dg/vect/vect-alias-check-ptr-info-2.c: Clear the arrays
        before the use of them.

Signed-off-by: Andrea Pinski <[email protected]>
---
 gcc/testsuite/gcc.dg/vect/vect-alias-check-ptr-info-2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-ptr-info-2.c 
b/gcc/testsuite/gcc.dg/vect/vect-alias-check-ptr-info-2.c
index 1deda2395ac..a3ca9496080 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-ptr-info-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-ptr-info-2.c
@@ -14,6 +14,8 @@ f (int c)
 {
   int n = hi - lo + 2;
   double t[n], u[n];
+  __builtin_memset(t, 0, sizeof(t));
+  __builtin_memset(u, 0, sizeof(u));
   double *tab[2] = { t, u };
 
   /* Load tab[idx&1] on both arms so PRE hoists it into a pretmp.  */
-- 
2.43.0

Reply via email to