]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Fix aarch64 after moving to C23
authorAndrew Pinski <quic_apinski@quicinc.com>
Wed, 20 Nov 2024 03:49:38 +0000 (19:49 -0800)
committerAndrew Pinski <quic_apinski@quicinc.com>
Wed, 20 Nov 2024 18:59:48 +0000 (10:59 -0800)
This fixes a few aarch64 specific testcases after the move to default to GNU C23.
For the SME testcases, the GNU C23 cases as `()` changing to mean `(void)` instead
of a non-prototype declaration; the non-prototype declaration merging was confusing
some of the time so the updated way is the expected way even for that.
For pic-*.c `-Wno-old-style-definition` was added not to warn about old style definitions.
For pr113573.c, I added `-std=gnu17` since I was not sure if `(...)` with C23 would invoke
the same issue.

tested for aarch64-linux-gnu.

PR testsuite/117680
gcc/testsuite/ChangeLog:

* gcc.target/aarch64/pic-constantpool1.c: Add -Wno-old-style-definition.
* gcc.target/aarch64/pic-symrefplus.c: Likewise.
* gcc.target/aarch64/pr113573.c: Add `-std=gnu17`
* gcc.target/aarch64/sme/streaming_mode_1.c: Correct testcase.
* gcc.target/aarch64/sme/za_state_1.c: Likewise.
* gcc.target/aarch64/sme/za_state_2.c: Likewise.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/testsuite/gcc.target/aarch64/pic-constantpool1.c
gcc/testsuite/gcc.target/aarch64/pic-symrefplus.c
gcc/testsuite/gcc.target/aarch64/pr113573.c
gcc/testsuite/gcc.target/aarch64/sme/streaming_mode_1.c
gcc/testsuite/gcc.target/aarch64/sme/za_state_1.c
gcc/testsuite/gcc.target/aarch64/sme/za_state_2.c

index 755c0b67ea45c5ec6e62fad1a592377cd62b37ca..1a5da9aacfa81b26d57f20b19a83517da72f49ba 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mcmodel=small -fPIC" }  */
+/* { dg-options "-Wno-old-style-definition -O2 -mcmodel=small -fPIC" }  */
 /* { dg-do compile } */
 /* { dg-require-effective-target fpic } */
 
index 0c5e7fe7fb47bc22869333b94775dfc7edd2751a..ca019ce3b33edfadc2a0ceed99993c137b70df32 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mcmodel=small -fPIC -fno-builtin" }  */
+/* { dg-options "-Wno-old-style-definition -O2 -mcmodel=small -fPIC -fno-builtin" }  */
 /* { dg-do compile } */
 /* { dg-require-effective-target fpic } */
 
index fc8607f7218c671dc2ecf9e2f91c0bc5ad896430..30175c4cb5c801109162edd971ce389f9515ff5b 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -std=gnu17" } */
 
 #pragma GCC aarch64 "arm_neon.h"
 typedef __Uint8x8_t uint8x8_t;
index 8874b05b882c3d40a9fc1beebf2d9dfeb677e2cc..cb1b05948d8342a2a5be886f2e1257288b96ee28 100644 (file)
@@ -7,7 +7,7 @@ void sc_b ();
 void sc_b () [[arm::streaming_compatible]]; // { dg-error "conflicting types" }
 
 void sc_c () [[arm::streaming_compatible]];
-void sc_c () {} // Inherits attribute from declaration (confusingly).
+void sc_c () {} // { dg-error "conflicting types" }
 
 void sc_d ();
 void sc_d () [[arm::streaming_compatible]] {} // { dg-error "conflicting types" }
@@ -33,7 +33,7 @@ void s_b ();
 void s_b () [[arm::streaming]]; // { dg-error "conflicting types" }
 
 void s_c () [[arm::streaming]];
-void s_c () {} // Inherits attribute from declaration (confusingly).
+void s_c () {} // { dg-error "conflicting types" }
 
 void s_d ();
 void s_d () [[arm::streaming]] {} // { dg-error "conflicting types" }
index 856880e2109313777fd119a6f11e17b732817809..7d7989b18b346e11010a4a64d5567db79ea37e06 100644 (file)
@@ -7,7 +7,7 @@ void shared_b ();
 void shared_b () [[arm::inout("za")]]; // { dg-error "conflicting types" }
 
 void shared_c () [[arm::inout("za")]];
-void shared_c () {} // Inherits attribute from declaration (confusingly).
+void shared_c () {} // { dg-error "conflicting types" }
 
 void shared_d ();
 void shared_d () [[arm::inout("za")]] {} // { dg-error "conflicting types" }
@@ -33,7 +33,7 @@ void preserved_b ();
 void preserved_b () [[arm::preserves("za")]]; // { dg-error "conflicting types" }
 
 void preserved_c () [[arm::preserves("za")]];
-void preserved_c () {} // Inherits attribute from declaration (confusingly).
+void preserved_c () {} // { dg-error "conflicting types" }
 
 void preserved_d ();
 void preserved_d () [[arm::preserves("za")]] {} // { dg-error "conflicting types" }
index 572ff309f8dffe3d5ecd01e7fb064bfca389313a..6f5803078df5f6efd81f95e5fca310794db0eb52 100644 (file)
@@ -30,7 +30,7 @@ void shared_b () [[arm::inout("za")]];
 void shared_c () [[arm::in("za")]] {} // { dg-error "conflicting types" }
 
 void shared_d () [[arm::in("za")]];
-[[arm::new("za")]] void shared_d () {} // { dg-error "cannot create a new 'za' scope since 'za' is shared with callers" }
+[[arm::new("za")]] void shared_d () {} // { dg-error "conflicting types" }
 
 [[arm::new("za")]] void shared_e () {}
 void shared_e () [[arm::out("za")]]; // { dg-error "conflicting types" }