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>
-/* { dg-options "-O2 -mcmodel=small -fPIC" } */
+/* { dg-options "-Wno-old-style-definition -O2 -mcmodel=small -fPIC" } */
/* { dg-do compile } */
/* { dg-require-effective-target fpic } */
-/* { 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 } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -std=gnu17" } */
#pragma GCC aarch64 "arm_neon.h"
typedef __Uint8x8_t uint8x8_t;
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" }
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" }
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" }
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" }
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" }