1+ #include " language-support.F90"
2+
13module prif_co_min_test_m
24 use iso_c_binding, only: c_int8_t, c_int16_t, c_int32_t, c_int64_t, c_float, c_double
35 use prif, only : prif_co_min, prif_co_min_character, prif_this_image_no_coarray, prif_num_images
@@ -10,6 +12,9 @@ module prif_co_min_test_m
1012 ,test_diagnosis_t &
1113 ,test_result_t &
1214 ,test_t
15+ #if ! HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
16+ use julienne_m, only : diagnosis_function_i
17+ #endif
1318 implicit none
1419
1520 private
@@ -27,10 +32,12 @@ pure function subject() result(test_subject)
2732 test_subject = " The prif_co_min subroutine"
2833 end function
2934
35+ #if HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
36+
3037 function results () result(test_results)
3138 type (test_result_t), allocatable :: test_results(:)
3239 type (prif_co_min_test_t) prif_co_min_test
33-
40+
3441 test_results = prif_co_min_test% run([ &
3542 test_description_t(" computing element-wise minima for integer(c_int32_t) scalars" , check_32_bit_integer) &
3643 ,test_description_t(" computing element-wise minima for a 1D default integer array" , check_default_integer) &
@@ -40,9 +47,38 @@ function results() result(test_results)
4047 ,test_description_t(" computing element-wise minima for a 2D real(c_float) array" , check_32_bit_real) &
4148 ,test_description_t(" computing element-wise minima for a 1D real(c_double) array" , check_64_bit_real) &
4249 ,test_description_t(" computing element-wise minima for a character scalar" , check_character) &
43- ])
50+ ])
51+ end function
52+
53+ #else
54+
55+ function results () result(test_results)
56+ type (test_result_t), allocatable :: test_results(:)
57+ type (prif_co_min_test_t) prif_co_min_test
58+ procedure (diagnosis_function_i), pointer :: &
59+ check_32_bit_integer_ptr = > check_32_bit_integer &
60+ ,check_default_integer_ptr = > check_default_integer &
61+ ,check_8_bit_integer_ptr = > check_8_bit_integer &
62+ ,check_16_bit_integer_ptr = > check_16_bit_integer &
63+ ,check_64_bit_integer_ptr = > check_64_bit_integer &
64+ ,check_32_bit_real_ptr = > check_32_bit_real &
65+ ,check_64_bit_real_ptr = > check_64_bit_real &
66+ ,check_character_ptr = > check_character
67+
68+ test_results = prif_co_min_test% run([ &
69+ test_description_t(" computing element-wise minima for integer(c_int32_t) scalars" , check_32_bit_integer_ptr) &
70+ ,test_description_t(" computing element-wise minima for a 1D default integer array" , check_default_integer_ptr) &
71+ ,test_description_t(" computing element-wise minima for a 1D integer(c_int8t) array" , check_8_bit_integer_ptr) &
72+ ,test_description_t(" computing element-wise minima for a 1D integer(c_int16_t) array" , check_16_bit_integer_ptr) &
73+ ,test_description_t(" computing element-wise minima for a 1D integer(c_int64_t) array" , check_64_bit_integer_ptr) &
74+ ,test_description_t(" computing element-wise minima for a 2D real(c_float) array" , check_32_bit_real_ptr) &
75+ ,test_description_t(" computing element-wise minima for a 1D real(c_double) array" , check_64_bit_real_ptr) &
76+ ,test_description_t(" computing element-wise minima for a character scalar" , check_character_ptr) &
77+ ])
4478 end function
4579
80+ #endif
81+
4682 function check_default_integer () result(test_diagnosis)
4783 type (test_diagnosis_t) test_diagnosis
4884
0 commit comments