diff --git a/src/caffeine/prif_private_s.F90 b/src/caffeine/prif_private_s.F90 index 7862c3db..79fb2466 100644 --- a/src/caffeine/prif_private_s.F90 +++ b/src/caffeine/prif_private_s.F90 @@ -1,5 +1,8 @@ ! Copyright (c), The Regents of the University of California ! Terms of use are as specified in LICENSE.txt + +#include "assert_macros.h" + submodule(prif) prif_private_s use assert_m implicit none @@ -246,11 +249,7 @@ subroutine base_pointer(coarray_handle, image_num, ptr) integer(c_int) :: num_img - ! TODO TEAMS: either move the assertion below into `caf_convert_base_addr()` - ! (avoiding the need to call prif_num_images here to fetch initial team size) - ! or cache the initial team size in a private module variable so we can just access it (issue #62) - call prif_num_images(num_images=num_img) - call assert(image_num > 0 .and. image_num <= num_img, "base_pointer: image_num not within valid range") + call_assert_describe(image_num > 0 .and. image_num <= initial_team%num_images, "base_pointer: image_num not within valid range") ptr = caf_convert_base_addr(coarray_handle%info%coarray_data, image_num) end subroutine