Message ID | 20241111185532.283272-1-dimitar@dinux.eu |
---|---|
State | New |
Headers | show |
Series | [committed] testsuite: Require atomic operations for c2y-if-decls-* | expand |
diff --git a/gcc/testsuite/gcc.dg/c2y-if-decls-1.c b/gcc/testsuite/gcc.dg/c2y-if-decls-1.c index ab9b3f20700..f4e8e5d2f88 100644 --- a/gcc/testsuite/gcc.dg/c2y-if-decls-1.c +++ b/gcc/testsuite/gcc.dg/c2y-if-decls-1.c @@ -1,6 +1,7 @@ /* N3356 - if declarations. */ /* PR c/117019 */ /* { dg-do run } */ +/* { dg-require-effective-target sync_int_long } */ /* { dg-options "-std=c2y -Wc23-c2y-compat" } */ /* Test C2Y if declarations. Valid usages. */ diff --git a/gcc/testsuite/gcc.dg/c2y-if-decls-11.c b/gcc/testsuite/gcc.dg/c2y-if-decls-11.c index 5ac962507c9..065e74c530a 100644 --- a/gcc/testsuite/gcc.dg/c2y-if-decls-11.c +++ b/gcc/testsuite/gcc.dg/c2y-if-decls-11.c @@ -1,6 +1,7 @@ /* N3356 - if declarations. */ /* PR c/117019 */ /* { dg-do run } */ +/* { dg-require-effective-target sync_int_long } */ /* { dg-options "-std=c2y -pedantic-errors" } */ /* Test C2Y if declarations. Valid usages. */ diff --git a/gcc/testsuite/gcc.dg/c2y-if-decls-4.c b/gcc/testsuite/gcc.dg/c2y-if-decls-4.c index 6df4bb09a9e..1648f6583bd 100644 --- a/gcc/testsuite/gcc.dg/c2y-if-decls-4.c +++ b/gcc/testsuite/gcc.dg/c2y-if-decls-4.c @@ -1,6 +1,7 @@ /* N3356 - if declarations. */ /* PR c/117019 */ /* { dg-do run } */ +/* { dg-require-effective-target sync_int_long } */ /* { dg-options "-std=c2y -Wc23-c2y-compat" } */ /* Test C2Y if declarations. Valid usages. */ diff --git a/gcc/testsuite/gcc.dg/c2y-if-decls-8.c b/gcc/testsuite/gcc.dg/c2y-if-decls-8.c index bd3c5cc4403..432b3da77f8 100644 --- a/gcc/testsuite/gcc.dg/c2y-if-decls-8.c +++ b/gcc/testsuite/gcc.dg/c2y-if-decls-8.c @@ -1,6 +1,7 @@ /* N3356 - if declarations. */ /* PR c/117019 */ /* { dg-do run } */ +/* { dg-require-effective-target sync_int_long } */ /* { dg-options "-std=c2y -pedantic-errors" } */ /* Test C2Y if declarations. Valid usages. */
Since some of the c2y-if-decls tests use _Atomic, add a requirement for target to support atomic operations on int and long types. This fixes spurious test link failures on pru-unknown-elf, which lacks atomic ops. The tests still pass on x86_64-linux-gnu. Pushed to trunk as obvious. gcc/testsuite/ChangeLog: * gcc.dg/c2y-if-decls-1.c: Require target that supports atomic operations on int and long types. * gcc.dg/c2y-if-decls-11.c: Ditto. * gcc.dg/c2y-if-decls-4.c: Ditto. * gcc.dg/c2y-if-decls-8.c: Ditto. Cc: Marek Polacek <polacek@redhat.com> Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu> --- gcc/testsuite/gcc.dg/c2y-if-decls-1.c | 1 + gcc/testsuite/gcc.dg/c2y-if-decls-11.c | 1 + gcc/testsuite/gcc.dg/c2y-if-decls-4.c | 1 + gcc/testsuite/gcc.dg/c2y-if-decls-8.c | 1 + 4 files changed, 4 insertions(+)