@@ -20,15 +20,15 @@ module test_linalg_svd
20
20
allocate(tests(0))
21
21
22
22
#:for rk,rt,ri in REAL_KINDS_TYPES
23
- tests = [ tests,new_unittest("test_svd_${ri}$",test_svd_${ri}$)]
23
+ call add_test( tests,new_unittest("test_svd_${ri}$",test_svd_${ri}$))
24
24
#:endfor
25
25
26
26
#:for ck,ct,ci in CMPLX_KINDS_TYPES
27
- tests = [ tests,new_unittest("test_complex_svd_${ci}$",test_complex_svd_${ci}$)]
27
+ call add_test( tests,new_unittest("test_complex_svd_${ci}$",test_complex_svd_${ci}$))
28
28
#:endfor
29
29
30
30
#:for rk,rt,ri in RC_KINDS_TYPES
31
- tests = [ tests,new_unittest("test_svd_row_${ri}$",test_svd_row_${ri}$)]
31
+ call add_test( tests,new_unittest("test_svd_row_${ri}$",test_svd_row_${ri}$))
32
32
#:endfor
33
33
34
34
end subroutine test_svd
@@ -264,6 +264,26 @@ module test_linalg_svd
264
264
265
265
#:endfor
266
266
267
+ ! gcc-15 bugfix utility
268
+ pure subroutine add_test(tests,new_test)
269
+ type(unittest_type), allocatable, intent(inout) :: tests(:)
270
+ type(unittest_type), intent(in) :: new_test
271
+
272
+ integer :: n
273
+ type(unittest_type), allocatable :: new_tests(:)
274
+
275
+ if (allocated(tests)) then
276
+ n = size(tests)
277
+ else
278
+ n = 0
279
+ end if
280
+
281
+ allocate(new_tests(n+1))
282
+ if (n>0) new_tests(1:n) = tests(1:n)
283
+ new_tests(1+n) = new_test
284
+ call move_alloc(from=new_tests,to=tests)
285
+
286
+ end subroutine add_test
267
287
268
288
end module test_linalg_svd
269
289
0 commit comments