From 794852f5922548f0c76cff8650495c8f36fa2e74 Mon Sep 17 00:00:00 2001 From: Pedro Olsen Ferreira Date: Fri, 10 May 2024 12:13:25 +0100 Subject: [PATCH] Strengthen address space pointer checks Add negative tests for address space casts. --- test_conformance/generic_address_space/basic_tests.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test_conformance/generic_address_space/basic_tests.cpp b/test_conformance/generic_address_space/basic_tests.cpp index b2e745c0fe..f751b91cf3 100644 --- a/test_conformance/generic_address_space/basic_tests.cpp +++ b/test_conformance/generic_address_space/basic_tests.cpp @@ -281,15 +281,21 @@ int test_casting(cl_device_id deviceID, cl_context context, cl_command_queue que NL " intp = &gint;" NL " failures += !(isFenceValid(get_fence(intp)));" NL " failures += !(to_global(intp));" + NL " failures += (to_local(intp) != NULL);" + NL " failures += (to_private(intp) != NULL);" NL " failures += (*intp != 1);" NL NL " intp = &lint;" NL " failures += !(isFenceValid(get_fence(intp)));" + NL " failures += (to_global(intp) != NULL);" NL " failures += !(to_local(intp));" + NL " failures += (to_private(intp) != NULL);" NL " failures += (*intp != 2);" NL NL " intp = &pint;" NL " failures += !(isFenceValid(get_fence(intp)));" + NL " failures += (to_global(intp) != NULL);" + NL " failures += (to_local(intp) != NULL);" NL " failures += !(to_private(intp));" NL " failures += (*intp != 3);" NL