diff --git a/sycl/source/detail/accessor_impl.hpp b/sycl/source/detail/accessor_impl.hpp index 1f0ce27a9f25b..a7db353600e3a 100644 --- a/sycl/source/detail/accessor_impl.hpp +++ b/sycl/source/detail/accessor_impl.hpp @@ -59,6 +59,18 @@ class __SYCL_EXPORT AccessorImplHost { MElemSize(Other.MElemSize), MOffsetInBytes(Other.MOffsetInBytes), MIsSubBuffer(Other.MIsSubBuffer), MPropertyList(Other.MPropertyList) {} + AccessorImplHost &operator=(const AccessorImplHost &Other) { + MAccData = Other.MAccData; + MAccessMode = Other.MAccessMode; + MSYCLMemObj = Other.MSYCLMemObj; + MDims = Other.MDims; + MElemSize = Other.MElemSize; + MOffsetInBytes = Other.MOffsetInBytes; + MIsSubBuffer = Other.MIsSubBuffer; + MPropertyList = Other.MPropertyList; + return *this; + } + // The resize method provides a way to change the size of the // allocated memory and corresponding properties for the accessor. // These are normally fixed for the accessor, but this capability diff --git a/sycl/test/basic_tests/accessor/host_acc_opt.cpp b/sycl/test/basic_tests/accessor/host_acc_opt.cpp index 17b8311050509..6e49d9fe69384 100644 --- a/sycl/test/basic_tests/accessor/host_acc_opt.cpp +++ b/sycl/test/basic_tests/accessor/host_acc_opt.cpp @@ -9,8 +9,6 @@ // CHECK: define {{.*}}foo{{.*}} { // CHECK-NOT: call // CHECK-NOT: invoke -// CHECK-NOT: call -// CHECK-NOT: invoke // CHECK: load <4 x i32> // CHECK-NOT: call // CHECK-NOT: invoke