public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] aarch64: Update sizeless tests
@ 2023-01-25 11:25 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2023-01-25 11:25 UTC (permalink / raw)
  To: gcc-patches

The sizeless-*.c tests contained (deliberately) invalid constructors
that had two errors.  The first error now suppresses the second error,
but the second error was the main focus of the test.  This patch
therefore rewrites it into a different form.

Tested on aarch64-linux-gnu & pushed.

Richard


gcc/testsuite/
	* gcc.target/aarch64/sve/acle/general-c/sizeless-1.c: Avoid
	"initializer element is not constant" error.
	* gcc.target/aarch64/sve/acle/general-c/sizeless-2.c: Likewise.
---
 .../gcc.target/aarch64/sve/acle/general-c/sizeless-1.c         | 3 +--
 .../gcc.target/aarch64/sve/acle/general-c/sizeless-2.c         | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c
index 4b34a71c1fe..01cfd14f873 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c
@@ -30,8 +30,7 @@ union union1 {
 /* Pointers to sizeless types.  */
 
 svint8_t *global_sve_sc_ptr;
-svint8_t *invalid_sve_sc_ptr = &(svint8_t) { *global_sve_sc_ptr }; /* { dg-error {initializer element is not constant} } */
-  /* { dg-error {SVE type 'svint8_t' does not have a fixed size} "2nd line" { target *-*-* } .-1 } */
+svint8_t *invalid_sve_sc_ptr = &(svint8_t) {};  /* { dg-error {SVE type 'svint8_t' does not have a fixed size} } */
 
 /* Sizeless arguments and return values.  */
 
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c
index 34dfd598e32..613b9c47878 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c
@@ -30,8 +30,7 @@ union union1 {
 /* Pointers to sizeless types.  */
 
 svint8_t *global_sve_sc_ptr;
-svint8_t *invalid_sve_sc_ptr = &(svint8_t) { *global_sve_sc_ptr }; /* { dg-error {initializer element is not constant} } */
-  /* { dg-error {SVE type 'svint8_t' does not have a fixed size} "2nd line" { target *-*-* } .-1 } */
+svint8_t *invalid_sve_sc_ptr = &(svint8_t) {}; /* { dg-error {SVE type 'svint8_t' does not have a fixed size} } */
 
 /* Sizeless arguments and return values.  */
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-25 11:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25 11:25 [pushed] aarch64: Update sizeless tests Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).