From 9b49dd6e2e2da2277110b0e8cd42c30b7abd3f76 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 21 Sep 2008 11:24:00 +0000 Subject: [PATCH] Made test for compiler atomic builtins more strict, such that drd/tests/atomic_var.c doesn't trigger bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34115 in a.o. gcc 4.3.1 when Valgrind is configured with --enable-only32bit. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8631 --- configure.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 422406cb07..3ed11bb783 100644 --- a/configure.in +++ b/configure.in @@ -1154,7 +1154,8 @@ AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap]) AC_TRY_LINK(, [ int variable = 1; - return __sync_bool_compare_and_swap(&variable, 1, 2) ? 1 : 0 + return (__sync_bool_compare_and_swap(&variable, 1, 2) + && __sync_add_and_fetch(&variable, 1) ? 1 : 0 ], [ AC_MSG_RESULT([yes]) -- 2.47.3