Jeff Law <l...@redhat.com> writes:
> The improvements in our ability to issue diagnostics for out of bounds
> accesses to trailing arrays is causing r10k-cache-barrier-9.c to fail on
> MIPS targets.
>
> This is a bit of an odd test.  It purposefully does out of bounds
> accesses.  Some accesses cross sub-object boundaries, others leave the
> object entirely.  Apparently the MIPS backend is supposed to detect this
> stuff and issue some kind of cache barrier instruction.
>
> Additionally mips.exp overrides dg-options and makes it harder to pass
> additional options, like -Wno-<whatever>.  You can use "-w", but not
> "-Wno-<...>".  We can't really use dg-warning markers because we don't
> get warnings at all optimization levels.
>
> One might argue the test is bogus, but I'm going to assume it serves
> some useful purpose.   I'm adding "-w" to suppress warnings.

Huh, yeah.  Certainly can't remember now why this seemed worth testing,
but I agree this patch is the best fix.

Richard

> Installing on the trunk,
>
> JEff
>
> diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
> index 0c5ec5325f5..5044002c09c 100644
> --- a/gcc/testsuite/ChangeLog
> +++ b/gcc/testsuite/ChangeLog
> @@ -1,3 +1,7 @@
> +2019-08-30  Jeff Law  <l...@redhat.com>
> +
> +     * gcc.target/mips/r10k-cache-barrier-9.c: Suppress warnings.
> +
>  2019-08-30  Martin Jambor  <mjam...@suse.cz>
>  
>       tree-optimization/91579
> diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-9.c 
> b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-9.c
> index 2f83968aad6..2516b663ca1 100644
> --- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-9.c
> +++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-9.c
> @@ -1,4 +1,4 @@
> -/* { dg-options "-mr10k-cache-barrier=store -G8" } */
> +/* { dg-options "-mr10k-cache-barrier=store -G8 -w" } */
>  
>  /* Test that out-of-range stores to components of static objects
>     are protected by a cache barrier.  */

Reply via email to