Skip to content

Commit 9de160b

Browse files
committed
remove goto
1 parent 194f4a1 commit 9de160b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/stdlib_linalg_svd.fypp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ submodule(stdlib_linalg) stdlib_linalg_svd
159159

160160
if (.not.k>0) then
161161
err0 = linalg_state_type(this,LINALG_VALUE_ERROR,'invalid or matrix size: a=',[m,n])
162-
goto 1
163-
end if
164-
165-
if (.not.size(s,kind=ilp)>=k) then
162+
call linalg_error_handling(err0,err)
163+
return
164+
elseif (.not.size(s,kind=ilp)>=k) then
166165
err0 = linalg_state_type(this,LINALG_VALUE_ERROR,'singular value array has insufficient size:',&
167166
' s=',shape(s,kind=ilp),', k=',k)
168-
goto 1
167+
call linalg_error_handling(err0,err)
168+
return
169169
endif
170170

171171
! Integer storage
@@ -287,7 +287,7 @@ submodule(stdlib_linalg) stdlib_linalg_svd
287287
if (copy_a) deallocate(amat)
288288
if (alloc_u) deallocate(umat)
289289
if (alloc_vt) deallocate(vtmat)
290-
1 call linalg_error_handling(err0,err)
290+
call linalg_error_handling(err0,err)
291291

292292
end subroutine stdlib_linalg_svd_${ri}$
293293
#:endif

0 commit comments

Comments
 (0)