Correct argument to SLASET (Improves fix from PR2778)

as explained by serguei-patchkovskii in Reference-LAPACK/lapack#438 (comment) , passing in an index of 1 instead of N leads to a standards violation accessing matrix A in SLASET, i.e. undefined behavior
This commit is contained in:
Martin Kroeker 2020-09-05 13:06:31 +02:00 committed by GitHub
parent 0d1f30a297
commit 8a2a137a9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -680,8 +680,8 @@
* the one from above. Compare it with D1 computed
* using the DSBTRD.
*
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
CALL CLACPY( ' ', K+1, N, A, LDA, U, LDU )
LH = MAX(1, 4*N)
LW = LWORK - LH
@ -753,8 +753,8 @@
* the one from above. Compare it with D1 computed
* using the DSBTRD.
*
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SD, 1 )
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SE, 1 )
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SD, N )
CALL SLASET( 'Full', N, 1, ZERO, ZERO, SE, N )
CALL CLACPY( ' ', K+1, N, A, LDA, U, LDU )
LH = MAX(1, 4*N)
LW = LWORK - LH