diff --git a/ethosu/regor/common/buffer_view.hpp b/ethosu/regor/common/buffer_view.hpp index 92c0dfc89038a7179845e21e20ed608be45434fb..8353757ebe1834d197dfbb86776c4e69d6a06161 100644 --- a/ethosu/regor/common/buffer_view.hpp +++ b/ethosu/regor/common/buffer_view.hpp @@ -357,8 +357,9 @@ public: // If the buffer is empty use the pointer to this buffer object as a hash to // disambiguate between different empty buffers. uintptr_t ptr = reinterpret_cast(this); - _dataHash.v32[0] = _dataHash.v32[1] = static_cast(ptr); - _dataHash.v32[2] = _dataHash.v32[3] = static_cast(ptr >> 32); + uint64_t ptr64 = static_cast(ptr); + _dataHash.v32[0] = _dataHash.v32[1] = static_cast(ptr64); + _dataHash.v32[2] = _dataHash.v32[3] = static_cast(ptr64 >> 32); } _invalidHash = false; }