From 54171955f3a7198baddd7a8a26e12c44a9b234da Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 31 Jan 2017 10:29:44 +0300 Subject: [PATCH] Fix test_atomic fail caused by AO_double_t misaligned load (Linux/i686) (Cherry-pick commit a53e41b from 'master' branch.) * src/atomic_ops/sysdeps/standard_ao_double_t.h [__i386__ && __GNUC__] (double_ptr_storage): Add aligned(8) attribute (so that AO_double_t global/static variables to have proper (double-word) alignment). --- src/atomic_ops/sysdeps/standard_ao_double_t.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/atomic_ops/sysdeps/standard_ao_double_t.h b/src/atomic_ops/sysdeps/standard_ao_double_t.h index 6814ad7..2a676ea 100644 --- a/src/atomic_ops/sysdeps/standard_ao_double_t.h +++ b/src/atomic_ops/sysdeps/standard_ao_double_t.h @@ -34,6 +34,9 @@ typedef unsigned __int64 double_ptr_storage; #elif defined(__aarch64__) typedef unsigned __int128 double_ptr_storage; +#elif defined(__i386__) && defined(__GNUC__) + typedef unsigned long long double_ptr_storage + __attribute__((__aligned__(8))); #else typedef unsigned long long double_ptr_storage; #endif -- 2.40.0