Skip to content

Commit 5aa66ad

Browse files
authored
Merge pull request #775 from echeresh/echeresh/fix-larr
Fix uninitialized out variables in *LARR* functions
2 parents 351b443 + 9a616e1 commit 5aa66ad

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

SRC/dlarra.f

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ SUBROUTINE DLARRA( N, D, E, E2, SPLTOL, TNRM,
164164
* .. Executable Statements ..
165165
*
166166
INFO = 0
167+
NSPLIT = 1
167168
*
168169
* Quick return if possible
169170
*
@@ -172,7 +173,6 @@ SUBROUTINE DLARRA( N, D, E, E2, SPLTOL, TNRM,
172173
END IF
173174
*
174175
* Compute splitting points
175-
NSPLIT = 1
176176
IF(SPLTOL.LT.ZERO) THEN
177177
* Criterion based on absolute off-diagonal value
178178
TMP1 = ABS(SPLTOL)* TNRM

SRC/dlarrc.f

+3-3
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,16 @@ SUBROUTINE DLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
167167
* .. Executable Statements ..
168168
*
169169
INFO = 0
170+
LCNT = 0
171+
RCNT = 0
172+
EIGCNT = 0
170173
*
171174
* Quick return if possible
172175
*
173176
IF( N.LE.0 ) THEN
174177
RETURN
175178
END IF
176179
*
177-
LCNT = 0
178-
RCNT = 0
179-
EIGCNT = 0
180180
MATT = LSAME( JOBT, 'T' )
181181

182182

SRC/dlarre.f

+2-2
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ SUBROUTINE DLARRE( RANGE, N, VL, VU, IL, IU, D, E, E2,
367367
*
368368

369369
INFO = 0
370+
NSPLIT = 0
371+
M = 0
370372
*
371373
* Quick return if possible
372374
*
@@ -384,8 +386,6 @@ SUBROUTINE DLARRE( RANGE, N, VL, VU, IL, IU, D, E, E2,
384386
IRANGE = INDRNG
385387
END IF
386388

387-
M = 0
388-
389389
* Get machine constants
390390
SAFMIN = DLAMCH( 'S' )
391391
EPS = DLAMCH( 'P' )

SRC/slarra.f

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ SUBROUTINE SLARRA( N, D, E, E2, SPLTOL, TNRM,
164164
* .. Executable Statements ..
165165
*
166166
INFO = 0
167+
NSPLIT = 1
167168
*
168169
* Quick return if possible
169170
*
@@ -172,7 +173,6 @@ SUBROUTINE SLARRA( N, D, E, E2, SPLTOL, TNRM,
172173
END IF
173174
*
174175
* Compute splitting points
175-
NSPLIT = 1
176176
IF(SPLTOL.LT.ZERO) THEN
177177
* Criterion based on absolute off-diagonal value
178178
TMP1 = ABS(SPLTOL)* TNRM

SRC/slarrc.f

+3-3
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,16 @@ SUBROUTINE SLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
167167
* .. Executable Statements ..
168168
*
169169
INFO = 0
170+
LCNT = 0
171+
RCNT = 0
172+
EIGCNT = 0
170173
*
171174
* Quick return if possible
172175
*
173176
IF( N.LE.0 ) THEN
174177
RETURN
175178
END IF
176179
*
177-
LCNT = 0
178-
RCNT = 0
179-
EIGCNT = 0
180180
MATT = LSAME( JOBT, 'T' )
181181

182182

SRC/slarre.f

+2-2
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ SUBROUTINE SLARRE( RANGE, N, VL, VU, IL, IU, D, E, E2,
367367
*
368368

369369
INFO = 0
370+
NSPLIT = 0
371+
M = 0
370372
*
371373
* Quick return if possible
372374
*
@@ -384,8 +386,6 @@ SUBROUTINE SLARRE( RANGE, N, VL, VU, IL, IU, D, E, E2,
384386
IRANGE = INDRNG
385387
END IF
386388

387-
M = 0
388-
389389
* Get machine constants
390390
SAFMIN = SLAMCH( 'S' )
391391
EPS = SLAMCH( 'P' )

0 commit comments

Comments
 (0)