Skip to content

Commit da09cfe

Browse files
committed
fix(test/julienne): support GCC 13 - 14.2
1 parent c6d9e71 commit da09cfe

12 files changed

+539
-6
lines changed

test/julienne/prif_co_broadcast_test_m.F90

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
#include "language-support.F90"
2+
13
module prif_co_broadcast_test_m
24
use prif, only : prif_co_broadcast, prif_num_images, prif_this_image_no_coarray
35
use julienne_m, only : test_description_t, test_diagnosis_t, test_result_t , test_t, operator(.expect.), operator(.equalsExpected.)
6+
#if ! HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
7+
use julienne_m, only : diagnosis_function_i
8+
#endif
49

510
implicit none
611
private
@@ -30,16 +35,35 @@ pure function subject() result(test_subject)
3035
test_subject = "The prif_co_broadcast subroutine"
3136
end function
3237

38+
#if HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
39+
3340
function results() result(test_results)
3441
type(test_result_t), allocatable :: test_results(:)
3542
type(prif_co_broadcast_test_t) prif_co_broadcast_test
36-
43+
3744
test_results = prif_co_broadcast_test%run([ &
3845
test_description_t("broadcasting a default integer scalar with no optional arguments present", broadcast_default_integer_scalar) &
3946
,test_description_t("broadcasting a derived type scalar with no allocatable components", broadcast_derived_type) &
4047
])
4148
end function
4249

50+
#else
51+
52+
function results() result(test_results)
53+
type(test_result_t), allocatable :: test_results(:)
54+
type(prif_co_broadcast_test_t) prif_co_broadcast_test
55+
procedure(diagnosis_function_i), pointer :: &
56+
broadcast_default_integer_scalar_ptr => broadcast_default_integer_scalar &
57+
,broadcast_derived_type_ptr => broadcast_derived_type
58+
59+
test_results = prif_co_broadcast_test%run([ &
60+
test_description_t("broadcasting a default integer scalar with no optional arguments present", broadcast_default_integer_scalar_ptr) &
61+
,test_description_t("broadcasting a derived type scalar with no allocatable components", broadcast_derived_type_ptr) &
62+
])
63+
end function
64+
65+
#endif
66+
4367
logical pure function equals(lhs, rhs)
4468
type(object_t), intent(in) :: lhs, rhs
4569
equals = all([ &

test/julienne/prif_co_max_test_m.F90

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "language-support.F90"
2+
13
module prif_co_max_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_max, prif_co_max_character, prif_this_image_no_coarray, prif_num_images
@@ -10,8 +12,12 @@ module prif_co_max_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

20+
1521
private
1622
public :: prif_co_max_test_t
1723

@@ -28,9 +34,38 @@ pure function subject() result(test_subject)
2834
test_subject = "The prif_co_max subroutine"
2935
end function
3036

37+
#if HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
38+
39+
function results() result(test_results)
40+
type(test_result_t), allocatable :: test_results(:)
41+
type(prif_co_max_test_t) prif_co_max_test
42+
43+
test_results = prif_co_max_test%run([ &
44+
test_description_t("computing element-wise maxima for integer(c_int32_t) scalars", check_32_bit_integer) &
45+
,test_description_t("computing element-wise maxima for a 1D default integer array", check_default_integer) &
46+
,test_description_t("computing element-wise maxima for a 1D integer(c_int8_t) array", check_8_bit_integer) &
47+
,test_description_t("computing element-wise maxima for a 1D integer(c_int16_t) array", check_16_bit_integer) &
48+
,test_description_t("computing element-wise maxima for a 1D integer(c_int64_t array", check_64_bit_integer) &
49+
,test_description_t("computing element-wise maxima for a 2D real(c_float) array", check_32_bit_real) &
50+
,test_description_t("computing element-wise maxima for a 1D real(c_double array", check_64_bit_real) &
51+
,test_description_t("computing element-wise maxima for character scalars", check_character) &
52+
])
53+
end function
54+
55+
#else
56+
3157
function results() result(test_results)
3258
type(test_result_t), allocatable :: test_results(:)
3359
type(prif_co_max_test_t) prif_co_max_test
60+
procedure(diagnosis_function_i), pointer :: &
61+
check_32_bit_integer_ptr => check_32_bit_integer &
62+
,check_default_integer_ptr => check_default_integer &
63+
,check_8_bit_integer_ptr => check_8_bit_integer &
64+
,check_16_bit_integer_ptr => check_16_bit_integer &
65+
,check_64_bit_integer_ptr => check_64_bit_integer &
66+
,check_32_bit_real_ptr => check_32_bit_real &
67+
,check_64_bit_real_ptr => check_64_bit_real &
68+
,check_character_ptr => check_character
3469

3570
test_results = prif_co_max_test%run([ &
3671
test_description_t("computing element-wise maxima for integer(c_int32_t) scalars", check_32_bit_integer) &
@@ -44,6 +79,7 @@ function results() result(test_results)
4479
])
4580
end function
4681

82+
#endif
4783
function check_default_integer() result(test_diagnosis)
4884
type(test_diagnosis_t) :: test_diagnosis
4985

test/julienne/prif_co_min_test_m.F90

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "language-support.F90"
2+
13
module 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

test/julienne/prif_co_reduce_test_m.F90

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "language-support.F90"
2+
13
module prif_co_reduce_test_m
24
use iso_c_binding, only: c_ptr, c_funptr, c_size_t, c_f_pointer, c_f_procpointer, c_funloc, c_loc, c_null_ptr
35
use prif, only : prif_co_reduce, prif_num_images, prif_this_image_no_coarray, prif_operation_wrapper_interface
@@ -12,6 +14,9 @@ module prif_co_reduce_test_m
1214
,test_diagnosis_t &
1315
,test_result_t &
1416
,test_t
17+
#if ! HAVE_PROCEDURAL_ACTUAL_FOR_POINTER_DUMMY
18+
use julienne_m, only : diagnosis_function_i
19+
#endif
1520
implicit none
1621

1722
private
@@ -47,9 +52,32 @@ pure function subject() result(test_subject)
4752
test_subject = "The prif_co_reduce subroutine"
4853
end function
4954

55+
#if HAVE_PROCEDURAL_ACTUAL_FOR_POINTER_DUMMY
56+
57+
function results() result(test_results)
58+
type(test_result_t), allocatable :: test_results(:)
59+
type(prif_co_reduce_test_t) prif_co_reduce_test
60+
61+
test_results = prif_co_reduce_test%run([ &
62+
test_description_t("performing a logical .and. reduction", check_logical) &
63+
,test_description_t("performing a derived type reduction", check_derived_type_reduction) &
64+
#if HAVE_PARAM_DERIVED
65+
,test_description_t("performing a parameterized derived type reduction", check_type_parameter_reduction) &
66+
#endif
67+
])
68+
end function
69+
70+
#else
71+
5072
function results() result(test_results)
5173
type(test_result_t), allocatable :: test_results(:)
5274
type(prif_co_reduce_test_t) prif_co_reduce_test
75+
procedure(diagnosis_function_i), pointer :: &
76+
check_logical_ptr => check_logical &
77+
,check_derived_type_reduction_ptr => check_derived_type_reduction
78+
#if HAVE_PARAM_DERIVED
79+
procedure(diagnosis_function_i), pointer :: check_type_parameter_reduction_ptr => check_type_parameter_reduction
80+
#endif
5381

5482
test_results = prif_co_reduce_test%run([ &
5583
test_description_t("performing a logical .and. reduction", check_logical) &
@@ -60,6 +88,10 @@ function results() result(test_results)
6088
])
6189
end function
6290

91+
92+
#endif
93+
94+
6395
function check_logical() result(test_diagnosis)
6496
type(test_diagnosis_t) test_diagnosis
6597
logical :: val

test/julienne/prif_co_sum_test_m.F90

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "language-support.F90"
2+
13
module prif_co_sum_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_sum, prif_num_images, prif_this_image_no_coarray
@@ -11,6 +13,9 @@ module prif_co_sum_test_m
1113
,test_diagnosis_t &
1214
,test_result_t &
1315
,test_t
16+
#if ! HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
17+
use julienne_m, only : diagnosis_function_i
18+
#endif
1419

1520
implicit none
1621
private
@@ -29,6 +34,8 @@ pure function subject() result(test_subject)
2934
test_subject = "The prif_co_sum subroutine"
3035
end function
3136

37+
#if HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
38+
3239
function results() result(test_results)
3340
type(test_result_t), allocatable :: test_results(:)
3441
type(prif_co_sum_test_t) prif_co_sum_test
@@ -46,6 +53,37 @@ function results() result(test_results)
4653
])
4754
end function
4855

56+
#else
57+
58+
function results() result(test_results)
59+
type(test_result_t), allocatable :: test_results(:)
60+
type(prif_co_sum_test_t) prif_co_sum_test
61+
procedure(diagnosis_function_i), pointer :: &
62+
check_default_integer_ptr => check_default_integer &
63+
,check_8_bit_integer_ptr => check_8_bit_integer &
64+
,check_16_bit_integer_ptr => check_16_bit_integer &
65+
,check_32_bit_integer_ptr => check_32_bit_integer &
66+
,check_64_bit_integer_ptr => check_64_bit_integer &
67+
,check_32_bit_real_ptr => check_32_bit_real &
68+
,check_64_bit_real_ptr => check_64_bit_real &
69+
,check_32_bit_complex_ptr => check_32_bit_complex &
70+
,check_64_bit_complex_ptr => check_64_bit_complex
71+
72+
test_results = prif_co_sum_test%run([ &
73+
test_description_t("computing the element-wise sum of a 1D default integer array", check_default_integer_ptr) &
74+
,test_description_t("computing the element-wise sum of a 1D 8-bit integer(c_int8_t) array", check_8_bit_integer_ptr) &
75+
,test_description_t("computing the element-wise sum of a 1D 16-bit integer(c_int16_t) array", check_16_bit_integer_ptr) &
76+
,test_description_t("computing the element-wise sum of integer(c_int32_t) scalars", check_32_bit_integer_ptr) &
77+
,test_description_t("computing the element-wise sum of a 1D 64-bit integer(c_int64_t) array", check_64_bit_integer_ptr) &
78+
,test_description_t("computing the element-wise sum of a 2D 32-bit real(c_float) array", check_32_bit_real_ptr) &
79+
,test_description_t("computing the element-wise sum of a 1D 64-bit real(c_double) array", check_64_bit_real_ptr) &
80+
,test_description_t("computing the element-wise sum of a 2D complex(c_float) array", check_32_bit_complex_ptr) &
81+
,test_description_t("computing the element-wise sum of a 1D complex(c_double) array", check_64_bit_complex_ptr) &
82+
])
83+
end function
84+
85+
#endif
86+
4987
function check_default_integer() result(test_diagnosis)
5088
type(test_diagnosis_t) test_diagnosis
5189

test/julienne/prif_coarray_inquiry_test_m.F90

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "language-support.F90"
2+
13
module prif_coarray_inquiry_test_m
24
use prif, only : &
35
prif_allocate_coarray, prif_deallocate_coarray, &
@@ -15,6 +17,9 @@ module prif_coarray_inquiry_test_m
1517
,test_diagnosis_t &
1618
,test_result_t &
1719
,test_t
20+
#if ! HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
21+
use julienne_m, only : diagnosis_function_i
22+
#endif
1823
use iso_c_binding, only: &
1924
c_ptr, c_null_ptr, c_int64_t, c_int, c_size_t, c_null_funptr, c_associated
2025

@@ -35,6 +40,8 @@ pure function subject() result(test_subject)
3540
test_subject = "The PRIF coarray inquiry subroutines"
3641
end function
3742

43+
#if HAVE_PROCEDURE_ACTUAL_FOR_POINTER_DUMMY
44+
3845
function results() result(test_results)
3946
type(test_result_t), allocatable :: test_results(:)
4047
type(prif_coarray_inquiry_test_t) prif_coarray_inquiry_test
@@ -45,6 +52,23 @@ function results() result(test_results)
4552
])
4653
end function
4754

55+
#else
56+
57+
function results() result(test_results)
58+
type(test_result_t), allocatable :: test_results(:)
59+
type(prif_coarray_inquiry_test_t) prif_coarray_inquiry_test
60+
procedure(diagnosis_function_i), pointer :: &
61+
check_prif_local_data_pointer_ptr => check_prif_local_data_pointer &
62+
,check_cobounds_ptr => check_cobounds
63+
64+
test_results = prif_coarray_inquiry_test%run([ &
65+
test_description_t("preserving the prif_local_data_pointer for an allocated coarray", check_prif_local_data_pointer_ptr) &
66+
,test_description_t("checking passed cobounds", check_cobounds_ptr) &
67+
])
68+
end function
69+
70+
#endif
71+
4872
function check_prif_local_data_pointer() result(test_diagnosis)
4973
type(test_diagnosis_t) test_diagnosis
5074

0 commit comments

Comments
 (0)