https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71135

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |olegendo at gcc dot gnu.org

--- Comment #6 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Another quick work around:

Index: libstdc++-v3/src/c++11/cow-stdexcept.cc
===================================================================
--- libstdc++-v3/src/c++11/cow-stdexcept.cc     (revision 236867)
+++ libstdc++-v3/src/c++11/cow-stdexcept.cc     (working copy)
@@ -271,13 +271,17 @@

 static void* txnal_read_ptr(void* const * ptr)
 {
+/*
   static_assert(sizeof(uint64_t) == sizeof(void*)
                || sizeof(uint32_t) == sizeof(void*),
                "Pointers must be 32 bits or 64 bits wide");
+*/
 #if __UINTPTR_MAX__ == __UINT64_MAX__
   return (void*)_ITM_RU8((const uint64_t*)ptr);
+#elif __UINTPTR_MAX__ == __UINT32_MAX__
+  return (void*)_ITM_RU4((const uint32_t*)ptr);
 #else
-  return (void*)_ITM_RU4((const uint32_t*)ptr);
+  return *ptr;
 #endif
 }

Reply via email to