Browse Source

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
tags/v0.3.11^2
Martin Kroeker GitHub 5 years ago
parent
commit
8a2a137a9e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      lapack-netlib/TESTING/EIG/cchkhb2stg.f

+ 4
- 4
lapack-netlib/TESTING/EIG/cchkhb2stg.f 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


Loading…
Cancel
Save