diff options
author | james <james@8a072113-8704-0410-8d35-dd094bca7971> | 2011-06-21 18:59:51 +0000 |
---|---|---|
committer | james <james@8a072113-8704-0410-8d35-dd094bca7971> | 2011-06-21 18:59:51 +0000 |
commit | ffd034b32b7f443988c8fb54274b97d5968dbd85 (patch) | |
tree | 4ba83d184b0de1fdc7d4ce039f8ca786160dc039 /SRC/slaed2.f | |
parent | f82b1646d39a9d016fcaf90462bd42ebd4b86944 (diff) | |
download | lapack-ffd034b32b7f443988c8fb54274b97d5968dbd85.tar.gz lapack-ffd034b32b7f443988c8fb54274b97d5968dbd85.tar.bz2 lapack-ffd034b32b7f443988c8fb54274b97d5968dbd85.zip |
Added IF statement to prevent potential out of range errors with "K+1" indices.
Diffstat (limited to 'SRC/slaed2.f')
-rw-r--r-- | SRC/slaed2.f | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/SRC/slaed2.f b/SRC/slaed2.f index 4ff11833..d904d25d 100644 --- a/SRC/slaed2.f +++ b/SRC/slaed2.f @@ -418,8 +418,11 @@ * The deflated eigenvalues and their corresponding vectors go back * into the last N - K slots of D and Q respectively. * - CALL SLACPY( 'A', N, CTOT( 4 ), Q2( IQ1 ), N, Q( 1, K+1 ), LDQ ) - CALL SCOPY( N-K, Z( K+1 ), 1, D( K+1 ), 1 ) + IF( K.LT.N ) THEN + CALL SLACPY( 'A', N, CTOT( 4 ), Q2( IQ1 ), N, + $ Q( 1, K+1 ), LDQ ) + CALL SCOPY( N-K, Z( K+1 ), 1, D( K+1 ), 1 ) + END IF * * Copy CTOT into COLTYP for referencing in SLAED3. * |