File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module test_linalg_qr
2222 allocate(tests(0))
2323
2424 #:for rk,rt,ri in RC_KINDS_TYPES
25- tests = [ tests,new_unittest("qr_random_${ri}$",test_qr_random_${ri}$)]
25+ call add_test( tests,new_unittest("qr_random_${ri}$",test_qr_random_${ri}$))
2626 #:endfor
2727
2828 end subroutine test_qr_factorization
@@ -110,6 +110,26 @@ module test_linalg_qr
110110
111111 #:endfor
112112
113+ ! gcc-15 bugfix utility
114+ pure subroutine add_test(tests,new_test)
115+ type(unittest_type), allocatable, intent(inout) :: tests(:)
116+ type(unittest_type), intent(in) :: new_test
117+
118+ integer :: n
119+ type(unittest_type), allocatable :: new_tests(:)
120+
121+ if (allocated(tests)) then
122+ n = size(tests)
123+ else
124+ n = 0
125+ end if
126+
127+ allocate(new_tests(n+1))
128+ if (n>0) new_tests(1:n) = tests(1:n)
129+ new_tests(1+n) = new_test
130+ call move_alloc(from=new_tests,to=tests)
131+
132+ end subroutine add_test
113133
114134end module test_linalg_qr
115135
You can’t perform that action at this time.
0 commit comments