From 9c5c6d9624b47cba6fb154c6e188b2be4c568d79 Mon Sep 17 00:00:00 2001 From: Andrei Tchouprakov Date: Sun, 7 Jun 2020 10:03:04 -0700 Subject: [PATCH] Fix compilation for clang cuda compiler --- testing/event.cu | 2 -- testing/future.cu | 2 -- testing/uninitialized_fill.cu | 1 + testing/unittest/runtime_static_assert.h | 3 +++ 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/event.cu b/testing/event.cu index a02f15fd7..5833d4145 100644 --- a/testing/event.cu +++ b/testing/event.cu @@ -58,8 +58,6 @@ void test_event_new_stream() { auto e0 = thrust::device_event(thrust::new_stream); - auto e0_stream = e0.stream().native_handle(); - ASSERT_EQUAL(true, e0.valid_stream()); ASSERT_NOT_EQUAL_QUIET(nullptr, e0.stream().native_handle()); diff --git a/testing/future.cu b/testing/future.cu index 0616230c9..137558860 100644 --- a/testing/future.cu +++ b/testing/future.cu @@ -102,8 +102,6 @@ struct test_future_new_stream { auto f0 = thrust::device_future(thrust::new_stream); - auto f0_stream = f0.stream().native_handle(); - ASSERT_EQUAL(true, f0.valid_stream()); ASSERT_EQUAL(false, f0.valid_content()); diff --git a/testing/uninitialized_fill.cu b/testing/uninitialized_fill.cu index 5e0d53c72..facd6fe6f 100644 --- a/testing/uninitialized_fill.cu +++ b/testing/uninitialized_fill.cu @@ -147,6 +147,7 @@ DECLARE_VECTOR_UNITTEST(TestUninitializedFillPOD); struct CopyConstructTest { + __host__ __device__ CopyConstructTest(void) :copy_constructed_on_host(false), copy_constructed_on_device(false) diff --git a/testing/unittest/runtime_static_assert.h b/testing/unittest/runtime_static_assert.h index 199a90ef3..13d8b68a9 100644 --- a/testing/unittest/runtime_static_assert.h +++ b/testing/unittest/runtime_static_assert.h @@ -72,6 +72,9 @@ namespace unittest namespace detail { +#ifdef __clang__ + __attribute__((used)) +#endif __device__ static static_assert_exception* device_exception = NULL; }