Skip to content

Commit beab0a3

Browse files
committed
aarch64: Fix aarch64 after moving to C23
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 <[email protected]>
1 parent e74f3eb commit beab0a3

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

gcc/testsuite/gcc.target/aarch64/pic-constantpool1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* { dg-options "-O2 -mcmodel=small -fPIC" } */
1+
/* { dg-options "-Wno-old-style-definition -O2 -mcmodel=small -fPIC" } */
22
/* { dg-do compile } */
33
/* { dg-require-effective-target fpic } */
44

gcc/testsuite/gcc.target/aarch64/pic-symrefplus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* { dg-options "-O2 -mcmodel=small -fPIC -fno-builtin" } */
1+
/* { dg-options "-Wno-old-style-definition -O2 -mcmodel=small -fPIC -fno-builtin" } */
22
/* { dg-do compile } */
33
/* { dg-require-effective-target fpic } */
44

gcc/testsuite/gcc.target/aarch64/pr113573.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* { dg-options "-O2" } */
1+
/* { dg-options "-O2 -std=gnu17" } */
22

33
#pragma GCC aarch64 "arm_neon.h"
44
typedef __Uint8x8_t uint8x8_t;

gcc/testsuite/gcc.target/aarch64/sme/streaming_mode_1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void sc_b ();
77
void sc_b () [[arm::streaming_compatible]]; // { dg-error "conflicting types" }
88

99
void sc_c () [[arm::streaming_compatible]];
10-
void sc_c () {} // Inherits attribute from declaration (confusingly).
10+
void sc_c () {} // { dg-error "conflicting types" }
1111

1212
void sc_d ();
1313
void sc_d () [[arm::streaming_compatible]] {} // { dg-error "conflicting types" }
@@ -33,7 +33,7 @@ void s_b ();
3333
void s_b () [[arm::streaming]]; // { dg-error "conflicting types" }
3434

3535
void s_c () [[arm::streaming]];
36-
void s_c () {} // Inherits attribute from declaration (confusingly).
36+
void s_c () {} // { dg-error "conflicting types" }
3737

3838
void s_d ();
3939
void s_d () [[arm::streaming]] {} // { dg-error "conflicting types" }

gcc/testsuite/gcc.target/aarch64/sme/za_state_1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void shared_b ();
77
void shared_b () [[arm::inout("za")]]; // { dg-error "conflicting types" }
88

99
void shared_c () [[arm::inout("za")]];
10-
void shared_c () {} // Inherits attribute from declaration (confusingly).
10+
void shared_c () {} // { dg-error "conflicting types" }
1111

1212
void shared_d ();
1313
void shared_d () [[arm::inout("za")]] {} // { dg-error "conflicting types" }
@@ -33,7 +33,7 @@ void preserved_b ();
3333
void preserved_b () [[arm::preserves("za")]]; // { dg-error "conflicting types" }
3434

3535
void preserved_c () [[arm::preserves("za")]];
36-
void preserved_c () {} // Inherits attribute from declaration (confusingly).
36+
void preserved_c () {} // { dg-error "conflicting types" }
3737

3838
void preserved_d ();
3939
void preserved_d () [[arm::preserves("za")]] {} // { dg-error "conflicting types" }

gcc/testsuite/gcc.target/aarch64/sme/za_state_2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void shared_b () [[arm::inout("za")]];
3030
void shared_c () [[arm::in("za")]] {} // { dg-error "conflicting types" }
3131

3232
void shared_d () [[arm::in("za")]];
33-
[[arm::new("za")]] void shared_d () {} // { dg-error "cannot create a new 'za' scope since 'za' is shared with callers" }
33+
[[arm::new("za")]] void shared_d () {} // { dg-error "conflicting types" }
3434

3535
[[arm::new("za")]] void shared_e () {}
3636
void shared_e () [[arm::out("za")]]; // { dg-error "conflicting types" }

0 commit comments

Comments
 (0)