1 /* { dg-do compile } */
2 /* { dg-options "-std=c++11 -O2" } */
3 /* { dg-require-effective-target arm_arch_v4t_ok } */
4 /* { dg-add-options arm_arch_v4t } */
5 /* { dg-additional-options "-marm" } */
7 /* Duplicate version of the test in g++.dg to be able to run this test only if
8 ARMv4t in ARM execution state can be targetted. Newer architecture don't
9 expose the bug this testcase was written for. */
12 __extension__ typedef unsigned long long int uint64_t;
13 namespace std __attribute__ ((__visibility__ ("default")))
15 typedef enum memory_order
21 namespace std __attribute__ ((__visibility__ ("default")))
23 template < typename _Tp > struct atomic
25 static constexpr int _S_min_alignment
26 = (sizeof (_Tp) & (sizeof (_Tp) - 1)) || sizeof (_Tp) > 16
28 static constexpr int _S_alignment
29 = _S_min_alignment > alignof (_Tp) ? _S_min_alignment : alignof (_Tp);
30 alignas (_S_alignment) _Tp _M_i;
31 operator _Tp () const noexcept
35 _Tp load (memory_order __m = memory_order_seq_cst) const noexcept
38 __atomic_load (&_M_i, &tmp, __m);
43 namespace lldb_private
52 typedef uint64_t addr_t;
58 void SetAddress (lldb::SBSection section, lldb::addr_t offset);
59 lldb_private::Address & ref ();
62 namespace lldb_private
67 const Address & SetOffset (lldb::addr_t offset)
69 bool changed = m_offset != offset;
71 std::atomic < lldb::addr_t > m_offset;
76 using namespace lldb_private;
78 SBAddress::SetAddress (lldb::SBSection section, lldb::addr_t offset)
80 Address & addr = ref ();
81 addr.SetOffset (offset);