Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7a9b191

Browse files
committed
linalg-schur: gcc-15 test fix
1 parent 47aed22 commit 7a9b191

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

‎test/linalg/test_linalg_schur.fypp

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ module test_linalg_schur
2222
allocate(tests(0))
2323

2424
#:for rk,rt,ri in RC_KINDS_TYPES
25-
tests = [tests,new_unittest("schur_api_${ri}$",test_schur_api_${ri}$), &
26-
new_unittest("schur_random_${ri}$",test_schur_random_${ri}$), &
27-
new_unittest("schur_symmetric_${ri}$",test_schur_symmetric_${ri}$)]
25+
call add_test(tests,new_unittest("schur_api_${ri}$",test_schur_api_${ri}$))
26+
call add_test(tests,new_unittest("schur_random_${ri}$",test_schur_random_${ri}$))
27+
call add_test(tests,new_unittest("schur_symmetric_${ri}$",test_schur_symmetric_${ri}$))
2828
#:endfor
2929

3030
end subroutine test_schur_decomposition
@@ -205,9 +205,29 @@ module test_linalg_schur
205205

206206
end subroutine test_schur_symmetric_${ri}$
207207

208-
209208
#:endfor
210209

210+
! gcc-15 bugfix utility
211+
pure subroutine add_test(tests,new_test)
212+
type(unittest_type), allocatable, intent(inout) :: tests(:)
213+
type(unittest_type), intent(in) :: new_test
214+
215+
integer :: n
216+
type(unittest_type), allocatable :: new_tests(:)
217+
218+
if (allocated(tests)) then
219+
n = size(tests)
220+
else
221+
n = 0
222+
end if
223+
224+
allocate(new_tests(n+1))
225+
if (n>0) new_tests(1:n) = tests(1:n)
226+
new_tests(1+n) = new_test
227+
call move_alloc(from=new_tests,to=tests)
228+
229+
end subroutine add_test
230+
211231
end module test_linalg_schur
212232

213233
program test_schur

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /