Skip to content

Commit 94994eb

Browse files
committed
Fix more bounds-violations in SLASET-calls
The last parameter must satisfy `LDA >= max(1,M)`, where M is the number of rows of the matrix, see https://github.com/Reference-LAPACK/lapack/blob/v3.9.0/SRC/slaset.f#L95 Suggested-By: Serguei Patchkovskii <Serguei.Patchkovskii@gmail.com>
1 parent a5bfdf8 commit 94994eb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

TESTING/EIG/schksb2stg.f

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,8 @@ SUBROUTINE SCHKSB2STG( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE,
743743
* the one from above. Compare it with D1 computed
744744
* using the SSBTRD.
745745
*
746-
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
747-
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
746+
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
747+
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
748748
CALL SLACPY( ' ', K+1, N, A, LDA, U, LDU )
749749
LH = MAX(1, 4*N)
750750
LW = LWORK - LH

TESTING/EIG/schkst2stg.f

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,8 @@ SUBROUTINE SCHKST2STG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
10321032
* the one from above. Compare it with D1 computed
10331033
* using the 1-stage.
10341034
*
1035-
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
1036-
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
1035+
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
1036+
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
10371037
CALL SLACPY( "L", N, N, A, LDA, V, LDU )
10381038
CALL SSYTRD_2STAGE( 'N', "L", N, V, LDU, SD, SE, TAU,
10391039
$ WORK, LH, WORK( LH+1 ), LW, IINFO )

0 commit comments

Comments
 (0)