[PATCH] c: Fix bogus vector initialisation error [PR96377]

Richard Sandiford richard.sandiford@arm.com
Mon Aug 3 15:35:41 GMT 2020


Jakub Jelinek <jakub@redhat.com> writes:
> On Mon, Aug 03, 2020 at 01:26:34PM +0200, Andreas Schwab wrote:
>> On Jul 31 2020, Richard Sandiford wrote:
>> 
>> > 	* gcc.dg/pr96377-1.c: New test.
>> > 	* gcc.dg/pr96377-2.c: Likewise.
>> 
>> Excess errors:
>> /daten/gcc/gcc-20200801/gcc/testsuite/gcc.dg/pr96377-2.c:11:1: warning: GCC vector passed by reference: non-standard ABI extension with no compatibility guarantee [-Wpsabi]
>> 
>> Excess errors:
>> /daten/gcc/gcc-20200801/gcc/testsuite/gcc.dg/pr96377-2.c:11:1: warning: GCC vector passed by reference: non-standard ABI extension with no compatibility guarantee [-Wpsabi]
>
> Usually we add -Wno-psabi -w to dg-options for such tests.

I just went for -Wno-psabi here.  Since the tests are tests for
diagnostics, I'd prefer not to add -w as well.

Tested on powerpc-linux-gnu.  Pushed to trunk and GCC 10 as obvious.

Richard


gcc/testsuite/
	* gcc.dg/pr96377-1.c: Add -Wno-psabi.
	* gcc.dg/pr96377-2.c: Likewise.
---
 gcc/testsuite/gcc.dg/pr96377-1.c | 2 +-
 gcc/testsuite/gcc.dg/pr96377-2.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/pr96377-1.c b/gcc/testsuite/gcc.dg/pr96377-1.c
index 2bf3f816331..75b0c9618ef 100644
--- a/gcc/testsuite/gcc.dg/pr96377-1.c
+++ b/gcc/testsuite/gcc.dg/pr96377-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-fno-lax-vector-conversions" } */
+/* { dg-options "-fno-lax-vector-conversions -Wno-psabi" } */
 /* { dg-message "use '-flax-vector-conversions' to permit conversions" "" { target *-*-* } 0 } */
 
 typedef int v4si __attribute__((vector_size(16)));
diff --git a/gcc/testsuite/gcc.dg/pr96377-2.c b/gcc/testsuite/gcc.dg/pr96377-2.c
index f58b06d9076..83550401156 100644
--- a/gcc/testsuite/gcc.dg/pr96377-2.c
+++ b/gcc/testsuite/gcc.dg/pr96377-2.c
@@ -1,4 +1,4 @@
-/* { dg-options "-flax-vector-conversions" } */
+/* { dg-options "-flax-vector-conversions -Wno-psabi" } */
 
 typedef int v4si __attribute__((vector_size(16)));
 typedef short v8hi __attribute__((vector_size(16)));


More information about the Gcc-patches mailing list