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
* 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
* 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
