File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ module test_linalg_determinant
4747 integer(ilp), parameter :: n = 128_ilp
4848
4949 ${rt}$ :: a(n,n),deta
50+ ${rt}$, allocatable :: aalloc(:,:)
5051
5152 a = eye(n)
5253
@@ -55,8 +56,18 @@ module test_linalg_determinant
5556
5657 call check(error,state%ok(),state%print())
5758 if (allocated(error)) return
58-
5959 call check(error, abs(deta-1.0_${rk}$)<epsilon(0.0_${rk}$), 'det(eye(n))==1')
60+ if (allocated(error)) return
61+
62+ !> Test with allocatable matrix
63+ aalloc = eye(n)
64+ deta = det(aalloc,overwrite_a=.false.,err=state)
65+ call check(error,state%ok(),state%print()//' (allocatable a)')
66+ if (allocated(error)) return
67+ call check(error,allocated(aalloc),'a is still allocated')
68+ if (allocated(error)) return
69+ call check(error, abs(deta-1.0_${rk}$)<epsilon(0.0_${rk}$), 'det(eye(n))==1 (allocatable a))')
70+ if (allocated(error)) return
6071
6172 end subroutine test_${rt[0]}$${rk}$_eye_determinant
6273
You can’t perform that action at this time.
0 commit comments