diff options
author | james <james@8a072113-8704-0410-8d35-dd094bca7971> | 2013-06-05 02:55:11 +0000 |
---|---|---|
committer | james <james@8a072113-8704-0410-8d35-dd094bca7971> | 2013-06-05 02:55:11 +0000 |
commit | 29b9e2c718ae698806f9feb5dd433a72952fd4d2 (patch) | |
tree | 49d17783ed8885002ff21499d6d8a707c5446e56 /SRC/cbbcsd.f | |
parent | 78de161a101e23236d6804b7e7f9ba66845d9586 (diff) | |
download | lapack-29b9e2c718ae698806f9feb5dd433a72952fd4d2.tar.gz lapack-29b9e2c718ae698806f9feb5dd433a72952fd4d2.tar.bz2 lapack-29b9e2c718ae698806f9feb5dd433a72952fd4d2.zip |
fixed array index problems in new CSD routines by adding MAX() to ensure index is at least 1 -- this fixes array bounds violations in the test suite when array bounds checking is enabled
Diffstat (limited to 'SRC/cbbcsd.f')
-rw-r--r-- | SRC/cbbcsd.f | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/SRC/cbbcsd.f b/SRC/cbbcsd.f index d60f532c..fdc2babc 100644 --- a/SRC/cbbcsd.f +++ b/SRC/cbbcsd.f @@ -477,7 +477,7 @@ * Initial deflation * IMAX = Q - DO WHILE( ( IMAX .GT. 1 ) .AND. ( PHI(IMAX-1) .EQ. ZERO ) ) + DO WHILE((IMAX.GT.1).AND.(PHI(MAX(IMAX-1,1)).EQ.ZERO)) IMAX = IMAX - 1 END DO IMIN = IMAX - 1 |