diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/atomic-lockfree-aux.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.dg/atomic-lockfree-aux.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/atomic-lockfree-aux.c b/gcc-4.9/gcc/testsuite/gcc.dg/atomic-lockfree-aux.c new file mode 100644 index 000000000..0ea872c30 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.dg/atomic-lockfree-aux.c @@ -0,0 +1,17 @@ +/* Test supply a __atomic_is_lock_free routine for lock-free tests. */ +/* Just compile it on its own. */ +/* { dg-do compile } */ +/* { dg-options "-w" } */ + +/* Test that __atomic_{is,always}_lock_free builtins execute. */ + +#include <stdlib.h> + +/* Supply a builtin external function which returns a non-standard value so + it can be detected that it was called. */ +int +__atomic_is_lock_free (size_t s, void *p) +{ + return 2; +} + |