File tree 1 file changed +12
-1
lines changed 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
47
47
integer(ilp), parameter :: n = 128_ilp
48
48
49
49
${rt}$ :: a(n,n),deta
50
+ ${rt}$, allocatable :: aalloc(:,:)
50
51
51
52
a = eye(n)
52
53
@@ -55,8 +56,18 @@ module test_linalg_determinant
55
56
56
57
call check(error,state%ok(),state%print())
57
58
if (allocated(error)) return
58
-
59
59
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
60
71
61
72
end subroutine test_${rt[0]}$${rk}$_eye_determinant
62
73
You can’t perform that action at this time.
0 commit comments