]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Require atomic operations for pr47333_0
authorDimitar Dimitrov <dimitar@dinux.eu>
Sun, 27 Oct 2024 07:49:49 +0000 (09:49 +0200)
committerDimitar Dimitrov <dimitar@dinux.eu>
Mon, 28 Oct 2024 20:11:30 +0000 (22:11 +0200)
Since the test uses __sync_fetch_and_add, add a requirement for
target to support atomic operations on int and long types.

This fixes a spurious test failure on pru-unknown-elf, which lacks
atomic ops. The test still passes on x86_64-linux-gnu.

gcc/testsuite/ChangeLog:

* g++.dg/lto/pr47333_0.C: Require target that supports atomic
operations on int and long types.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
gcc/testsuite/g++.dg/lto/pr47333_0.C

index b171c8cb9604a1c998bb24bfb4641560a9bf4fe1..254a378f8dfda3ead43d18ad4ae542ad818d35d1 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target sync_int_long } */
 /* "WARNING: lto.exp does not support dg-additional-options" */
 #pragma GCC diagnostic ignored "-Wtemplate-body"