]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Update sizeless tests
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 25 Jan 2023 11:24:32 +0000 (11:24 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 25 Jan 2023 11:24:32 +0000 (11:24 +0000)
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.

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/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c
gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c

index 4b34a71c1fefda4b04af35e0da6c20493d9bfd9d..01cfd14f873a0e042e002975b8409b075f3d9b31 100644 (file)
@@ -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.  */
 
index 34dfd598e321b15be6f8b093fe9cbebbd9548cd2..613b9c478780fae977cf3687c11cb22276e9cd8a 100644 (file)
@@ -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.  */