Skip to content

Commit 80be056

Browse files
committed
WIP: fix runtime crash with nafor for fresh build
1 parent 8fa028b commit 80be056

File tree

10 files changed

+80
-44
lines changed

10 files changed

+80
-44
lines changed

src/sourcery_m.f90 renamed to src/sourcery_m.F90

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ module sourcery_m
77
use sourcery_file_m, only : file_t
88
use sourcery_string_m, only : string_t, operator(.cat.)
99
use sourcery_test_m, only : test_t, test_description_substring
10-
use sourcery_test_description_m, only : test_description_t, test_function_i
10+
use sourcery_test_description_m, only : test_description_t
11+
#ifdef __GFORTRAN__
12+
use sourcery_test_description_m, only : test_function_i
13+
#endif
1114
use sourcery_test_result_m, only : test_result_t
1215
use sourcery_user_defined_collectives_m, only : co_all
1316

test/bin_test.F90

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module bin_test_m
22
!! Check data partitioning across bins
3-
use sourcery_m, only : bin_t, test_t, test_result_t, test_description_t, test_description_substring, test_function_i, string_t
3+
use sourcery_m, only : bin_t, test_t, test_result_t, test_description_t, test_description_substring, string_t
4+
#ifdef __GFORTRAN__
5+
use sourcery_m, only : test_function_i
6+
#endif
47
use assert_m, only : assert
58
implicit none
69

test/command_line_test.F90

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
module command_line_test_m
22
!! Verify object pattern asbtract parent
3-
use sourcery_m, only : &
4-
test_t, test_result_t, command_line_t, test_description_substring, test_function_i, string_t, test_description_t
3+
use sourcery_m, only : test_t, test_result_t, command_line_t, test_description_substring, string_t, test_description_t
4+
#ifdef __GFORTRAN__
5+
use sourcery_m, only : test_function_i
6+
#endif
7+
58
implicit none
69

710
private

test/data_partition_test.F90

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
module data_partition_test_m
22
!! check data partitioning across images and data gathering
33
use sourcery_m, only : &
4-
data_partition_t, test_t, test_result_t, test_description_substring, test_description_t, test_function_i, string_t
4+
data_partition_t, test_t, test_result_t, test_description_substring, test_description_t, string_t
5+
#ifdef __GFORTRAN__
6+
use sourcery_m, only : test_function_i
7+
#endif
8+
59
use iso_fortran_env, only : real64
610
implicit none
711

@@ -37,7 +41,7 @@ function results() result(test_results)
3741
check_all_gather_2D_real_array), &
3842
test_description_t(string_t("gathering dimension 1 of 2D real array onton all images with dim argument"), &
3943
check_all_gather_2D_real_array_dim1), &
40-
test_description_t(strint_t("gathering dimension 1 of 2D real array onto result_image with dim argument"), &
44+
test_description_t(string_t("gathering dimension 1 of 2D real array onto result_image with dim argument"), &
4145
check_gather_2D_real_array_dim1) &
4246
]
4347
#else

test/formats_test.F90

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
module formats_test_m
22
!! Verify that format strings provide the desired formatting
3-
use sourcery_m, only : &
4-
separated_values, test_t, test_result_t, test_description_t, test_function_i, test_description_substring, string_t
3+
use sourcery_m, only : separated_values, test_t, test_result_t, test_description_t, test_description_substring, string_t
4+
#ifdef __GFORTRAN__
5+
use sourcery_m, only : test_function_i
6+
#endif
7+
58
implicit none
69

710
private
@@ -26,10 +29,10 @@ function results() result(test_results)
2629

2730
#ifndef __GFORTRAN__
2831
test_descriptions = [ &
29-
test_description_t("yielding a comma-separated list of real numbers", check_csv_reals), &
30-
test_description_t("yielding a space-separated list of complex numbers", check_space_separated_complex), &
31-
test_description_t("yielding a comma- and space-separated list of character values", check_csv_character), &
32-
test_description_t("yielding a new-line-separated list of integer numbers", check_new_line_separated_integers) &
32+
test_description_t(string_t("yielding a comma-separated list of real numbers"), check_csv_reals), &
33+
test_description_t(string_t("yielding a space-separated list of complex numbers"), check_space_separated_complex), &
34+
test_description_t(string_t("yielding a comma- and space-separated list of character values"), check_csv_character), &
35+
test_description_t(string_t("yielding a new-line-separated list of integer numbers"), check_new_line_separated_integers) &
3336
]
3437
#else
3538
! Work around missing Fortran 2008 feature: associating a procedure actual argument with a procedure pointer dummy argument:

test/main.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ program main
2020

2121
integer :: passes=0, tests=0
2222

23-
2423
call bin_test%report(passes, tests)
2524
call data_partition_test%report(passes, tests)
2625
call collectives_test%report(passes, tests)

test/object_test.F90

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module object_m_test_m
22
!! Verify object pattern asbtract parent
3-
use sourcery_m, only : test_t, test_result_t, object_t, test_description_t, test_function_i, string_t, test_description_substring
3+
use sourcery_m, only : test_t, test_result_t, object_t, test_description_t, string_t, test_description_substring
4+
#ifdef __GFORTRAN__
5+
use sourcery_m, only : test_function_i
6+
#endif
47
implicit none
58

69
private

test/string_test.F90

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module string_test_m
2-
use sourcery_m, only : &
3-
test_t, test_result_t, string_t, operator(.cat.), test_description_t, test_function_i, test_description_substring
2+
use sourcery_m, only : test_t, test_result_t, string_t, operator(.cat.), test_description_t, test_description_substring
3+
#ifdef __GFORTRAN__
4+
use sourcery_m, only : test_function_i
5+
#endif
46
implicit none
57

68
private
@@ -25,30 +27,43 @@ function results() result(test_results)
2527

2628
#ifndef __GFORTRAN__
2729
test_descriptions = [ &
28-
test_description_t( &
29-
string_t("is_allocated() result .true. if & only if the string_t component(s) is/are allocated"), check_allocation), &
30-
test_description_t(string_t('supporting operator(==) for string_t and character operands'), supports_equivalence_operator), &
31-
test_description_t( &
32-
string_t('supporting operator(/=) for string_t and character operands'), supports_non_equivalence_operator), &
33-
test_description_t( &
34-
string_t('supporting operator(//) for string_t and character operands'), supports_concatenation_operator), &
35-
test_description_t(string_t('assigning a string_t object to a character variable'), assigns_string_t_to_character), &
36-
test_description_t(string_t('assigning a character variable to a string_t object'), assigns_character_to_string_t), &
37-
test_description_t(string_t('constructing from a default integer'), constructs_from_default_integer), &
38-
test_description_t(string_t('constructing from a real value'), constructs_from_real), &
39-
test_description_t(string_t('supporting unary operator(.cat.) for array arguments'), concatenates_elements), &
40-
test_description_t(string_t("extracting a key string from a colon-separated key/value pair"), extracts_key), &
41-
test_description_t(string_t("extracting a real value from a colon-separated key/value pair"), extracts_real_value), &
42-
test_description_t(string_t("extracting a string value from a colon-separated key/value pair"), extracts_string_value), &
43-
test_description_t(string_t("extracting a logical value from a colon-separated key/value pair"), extracts_logical_value), &
44-
test_description_t( &
45-
string_t("extracting an integer array value from a colon-separated key/value pair"), extracts_integer_array_value), &
46-
test_description_t( &
47-
string_t("extracting an real array value from a colon-separated key/value pair"), extracts_real_array_value), &
48-
test_description_t(string_t("extracting an integer value from a colon-separated key/value pair"), extracts_integer_value), &
49-
test_description_t(string_t('extracting a file base name'), extracts_file_base_name()), &
50-
test_description_t(string_t('extracting a file name extension'), extracts_file_name_extension()) &
51-
]
30+
test_description_t &
31+
(string_t("is_allocated() result .true. if & only if the string_t component(s) is/are allocated"), check_allocation), &
32+
test_description_t &
33+
(string_t('supporting operator(==) for string_t and character operands'), supports_equivalence_operator), &
34+
test_description_t &
35+
(string_t('supporting operator(/=) for string_t and character operands'), supports_non_equivalence_operator), &
36+
test_description_t &
37+
(string_t('supporting operator(//) for string_t and character operands'), supports_concatenation_operator), &
38+
test_description_t &
39+
(string_t('assigning a string_t object to a character variable'), assigns_string_t_to_character), &
40+
test_description_t &
41+
(string_t('assigning a character variable to a string_t object'), assigns_character_to_string_t), &
42+
test_description_t &
43+
(string_t('constructing from a default integer'), constructs_from_default_integer), &
44+
test_description_t &
45+
(string_t('constructing from a real value'), constructs_from_real), &
46+
test_description_t &
47+
(string_t('supporting unary operator(.cat.) for array arguments'), concatenates_elements), &
48+
test_description_t &
49+
(string_t("extracting a key string from a colon-separated key/value pair"), extracts_key), &
50+
test_description_t &
51+
(string_t("extracting a real value from a colon-separated key/value pair"), extracts_real_value), &
52+
test_description_t &
53+
(string_t("extracting a string value from a colon-separated key/value pair"), extracts_string_value), &
54+
test_description_t &
55+
(string_t("extracting a logical value from a colon-separated key/value pair"), extracts_logical_value), &
56+
test_description_t &
57+
(string_t("extracting an integer array value from a colon-separated key/value pair"), extracts_integer_array_value), &
58+
test_description_t &
59+
(string_t("extracting an real array value from a colon-separated key/value pair"), extracts_real_array_value), &
60+
test_description_t &
61+
(string_t("extracting an integer value from a colon-separated key/value pair"), extracts_integer_value), &
62+
test_description_t &
63+
(string_t('extracting a file base name'), extracts_file_base_name), &
64+
test_description_t &
65+
(string_t('extracting a file name extension'), extracts_file_name_extension) &
66+
]
5267
#else
5368
! Work around missing Fortran 2008 feature: associating a procedure actual argument with a procedure pointer dummy argument:
5469
procedure(test_function_i), pointer :: &

test/test_result_test.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module test_result_test_m
22
!! Verify test_result_t object behavior
33
use sourcery_m, only : string_t, test_result_t, test_description_t, test_t, test_description_substring
44
#ifdef __GFORTRAN__
5-
use sourcery_test_description_m, only : test_function_i
5+
use sourcery_m, only : test_function_i
66
#endif
77
implicit none
88

@@ -28,7 +28,7 @@ function results() result(test_results)
2828

2929
#ifndef __GFORTRAN__
3030
test_descriptions = [ &
31-
test_description_t(string_t("constructing an array of test_result_t objects elementally"), check_array_result_construction) &
31+
test_description_t(string_t("constructing an array of test_result_t objects elementally"), check_array_result_construction), &
3232
test_description_t(string_t("reporting failure if the test fails on one image"), check_single_image_failure) &
3333
]
3434
#else

test/user_defined_collectives_test.F90

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module user_defined_collectives_test_m
2-
use sourcery_m, only : co_all, test_t, test_result_t, test_description_t, test_description_substring, test_function_i, string_t
2+
use sourcery_m, only : co_all, test_t, test_result_t, test_description_t, test_description_substring, string_t
3+
#ifdef __GFORTRAN__
4+
use sourcery_m, only : test_function_i
5+
#endif
36
implicit none
47

58
private
@@ -26,7 +29,7 @@ function results() result(test_results)
2629
test_descriptions = [ &
2730
test_description_t &
2831
(string_t("setting all arguments to .true. when previously .true. on all images"), check_co_all_with_all_true), &
29-
test_description_t
32+
test_description_t &
3033
(string_t("setting all arguments to .false. when previously .false. on image 1"), check_co_all_with_one_false) &
3134
]
3235
#else

0 commit comments

Comments
 (0)