summaryrefslogtreecommitdiffstats
path: root/vespamalloc
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2017-08-11 09:23:31 +0000
committerGitHub <noreply@github.com>2017-08-11 09:23:31 +0000
commit4b579092b3ee6231b4416cb197c8f5105f6e416c (patch)
treea1b29c3ec7d229844de2a885f14e51af7ce55e8b /vespamalloc
parent8e2b32c28708a2989341797c722f68b07d847c3d (diff)
parent290eb43713539a5e2c167c66336efb75660ce7d6 (diff)
Merge pull request #3079 from vespa-engine/balder/show-behavioral-change-between-gcc-6-and-7
Document behavioral change between gcc 6 and 7.
Diffstat (limited to 'vespamalloc')
-rw-r--r--vespamalloc/src/tests/test1/testatomic.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/vespamalloc/src/tests/test1/testatomic.cpp b/vespamalloc/src/tests/test1/testatomic.cpp
index 686536ae252..448b0776f1a 100644
--- a/vespamalloc/src/tests/test1/testatomic.cpp
+++ b/vespamalloc/src/tests/test1/testatomic.cpp
@@ -112,7 +112,12 @@ int Test::Main()
{
std::atomic<vespamalloc::TaggedPtr> taggedPtr;
ASSERT_EQUAL(16u, sizeof(vespamalloc::TaggedPtr));
+#if __GNUC__ < 7
+ // See https://gcc.gnu.org/ml/gcc-patches/2017-01/msg02344.html for background
ASSERT_TRUE(taggedPtr.is_lock_free());
+#else
+ ASSERT_FALSE(taggedPtr.is_lock_free());
+#endif
}
testSwap<uint32_t>(6);