Re: [PATCH] [testsuite] fix array element count

2023-03-16 Thread Richard Biener via Gcc-patches
On Wed, 15 Mar 2023, Alexandre Oliva wrote:

> 
> This test is similar to pr103116-1.c, but instead of writing to
> 4*COUNT elements of x, it writes to 8*COUNT elements, but the
> definition of x seems to have been adjusted along with the loop.  Fix
> the array size so that it doesn't scribble over unrelated
> statically-allocated objects.
> 
> Regstrapped on ppc64-linux-gnu.  Also tested with gcc-11 on vxworks7r2
> (x86- and x86_64-), where the scribbling caused visible runtime effects.
> Ok to install?  I'm tempted to put this in as obvious.

OK (it's really obvious).

Richard.

> 
> for  gcc/testsuite/ChangeLog
> 
>   * gcc.dg/vect/pr103116-2.c (x): Fix array size.
> ---
>  gcc/testsuite/gcc.dg/vect/pr103116-2.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/testsuite/gcc.dg/vect/pr103116-2.c 
> b/gcc/testsuite/gcc.dg/vect/pr103116-2.c
> index 2f4ed0f404c76..aa9797a94074c 100644
> --- a/gcc/testsuite/gcc.dg/vect/pr103116-2.c
> +++ b/gcc/testsuite/gcc.dg/vect/pr103116-2.c
> @@ -31,7 +31,7 @@ loop (TYPE *restrict x, TYPE *restrict y)
>  }
>  }
>  
> -TYPE x[COUNT * 4];
> +TYPE x[COUNT * 8];
>  
>  int
>  main (void)
> 
> 

-- 
Richard Biener 
SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg,
Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman;
HRB 36809 (AG Nuernberg)


[PATCH] [testsuite] fix array element count

2023-03-15 Thread Alexandre Oliva via Gcc-patches


This test is similar to pr103116-1.c, but instead of writing to
4*COUNT elements of x, it writes to 8*COUNT elements, but the
definition of x seems to have been adjusted along with the loop.  Fix
the array size so that it doesn't scribble over unrelated
statically-allocated objects.

Regstrapped on ppc64-linux-gnu.  Also tested with gcc-11 on vxworks7r2
(x86- and x86_64-), where the scribbling caused visible runtime effects.
Ok to install?  I'm tempted to put this in as obvious.


for  gcc/testsuite/ChangeLog

* gcc.dg/vect/pr103116-2.c (x): Fix array size.
---
 gcc/testsuite/gcc.dg/vect/pr103116-2.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/vect/pr103116-2.c 
b/gcc/testsuite/gcc.dg/vect/pr103116-2.c
index 2f4ed0f404c76..aa9797a94074c 100644
--- a/gcc/testsuite/gcc.dg/vect/pr103116-2.c
+++ b/gcc/testsuite/gcc.dg/vect/pr103116-2.c
@@ -31,7 +31,7 @@ loop (TYPE *restrict x, TYPE *restrict y)
 }
 }
 
-TYPE x[COUNT * 4];
+TYPE x[COUNT * 8];
 
 int
 main (void)

-- 
Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/
   Free Software Activist   GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about