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 47aed22

Browse files
committed
linalg-qr: gcc-15 test fix
1 parent f83a793 commit 47aed22

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

‎test/linalg/test_linalg_qr.fypp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff 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

114134
end module test_linalg_qr
115135

0 commit comments

Comments
(0)

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