@@ -23,13 +23,13 @@ module test_linalg_determinant
23
23
24
24
#:for rk,rt in RC_KINDS_TYPES
25
25
#:if rk!="xdp"
26
- tests = [ tests,new_unittest("$eye_det_${rt[0]}$${rk}$",test_${rt[0]}$${rk}$_eye_determinant)]
27
- tests = [ tests,new_unittest("$eye_det_multiple_${rt[0]}$${rk}$",test_${rt[0]}$${rk}$_eye_multiple)]
26
+ call add_test( tests,new_unittest("$eye_det_${rt[0]}$${rk}$",test_${rt[0]}$${rk}$_eye_determinant))
27
+ call add_test( tests,new_unittest("$eye_det_multiple_${rt[0]}$${rk}$",test_${rt[0]}$${rk}$_eye_multiple))
28
28
#:endif
29
29
#:endfor
30
30
#:for ck,ct in CMPLX_KINDS_TYPES
31
31
#:if ck!="xdp"
32
- tests = [ tests,new_unittest("$complex_det_${rt[0]}$${rk}$",test_${ct[0]}$${ck}$_complex_determinant)]
32
+ call add_test( tests,new_unittest("$complex_det_${rt[0]}$${rk}$",test_${ct[0]}$${ck}$_complex_determinant))
33
33
#:endif
34
34
#: endfor
35
35
@@ -143,6 +143,27 @@ module test_linalg_determinant
143
143
144
144
#:endif
145
145
#:endfor
146
+
147
+ ! gcc-15 bugfix utility
148
+ pure subroutine add_test(tests,new_test)
149
+ type(unittest_type), allocatable, intent(inout) :: tests(:)
150
+ type(unittest_type), intent(in) :: new_test
151
+
152
+ integer :: n
153
+ type(unittest_type), allocatable :: new_tests(:)
154
+
155
+ if (allocated(tests)) then
156
+ n = size(tests)
157
+ else
158
+ n = 0
159
+ end if
160
+
161
+ allocate(new_tests(n+1))
162
+ if (n>0) new_tests(1:n) = tests(1:n)
163
+ new_tests(1+n) = new_test
164
+ call move_alloc(from=new_tests,to=tests)
165
+
166
+ end subroutine add_test
146
167
147
168
end module test_linalg_determinant
148
169
0 commit comments