Skip to content

Commit

Permalink
Fix uninitialized M when quick return in DLARRD and SLARRD
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Kobotov committed Nov 29, 2022
1 parent a72090a commit 6ae0fbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions SRC/dlarrd.f
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ SUBROUTINE DLARRD( RANGE, ORDER, N, VL, VU, IL, IU, GERS,
* .. Executable Statements ..
*
INFO = 0
M = 0
*
* Quick return if possible
*
Expand Down Expand Up @@ -424,14 +425,9 @@ SUBROUTINE DLARRD( RANGE, ORDER, N, VL, VU, IL, IU, GERS,
END IF

* Initialize error flags
INFO = 0
NCNVRG = .FALSE.
TOOFEW = .FALSE.

* Quick return if possible
M = 0
IF( N.EQ.0 ) RETURN

* Simplification:
IF( IRANGE.EQ.INDRNG .AND. IL.EQ.1 .AND. IU.EQ.N ) IRANGE = 1

Expand Down
6 changes: 1 addition & 5 deletions SRC/slarrd.f
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ SUBROUTINE SLARRD( RANGE, ORDER, N, VL, VU, IL, IU, GERS,
* .. Executable Statements ..
*
INFO = 0
M = 0
*
* Quick return if possible
*
Expand Down Expand Up @@ -424,14 +425,9 @@ SUBROUTINE SLARRD( RANGE, ORDER, N, VL, VU, IL, IU, GERS,
END IF

* Initialize error flags
INFO = 0
NCNVRG = .FALSE.
TOOFEW = .FALSE.

* Quick return if possible
M = 0
IF( N.EQ.0 ) RETURN

* Simplification:
IF( IRANGE.EQ.INDRNG .AND. IL.EQ.1 .AND. IU.EQ.N ) IRANGE = 1

Expand Down

0 comments on commit 6ae0fbe

Please sign in to comment.