--- src/sgebd2.f	Thu Dec  5 20:18:10 2002
+++ debian/updates/src/sgebd2.f	Wed Dec  4 15:23:42 2002
@@ -3,7 +3,7 @@
 *  -- LAPACK routine (version 3.0) --
 *     Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
 *     Courant Institute, Argonne National Lab, and Rice University
-*     February 29, 1992
+*     May 7, 2001
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -169,8 +169,9 @@
 *
 *           Apply H(i) to A(i:m,i+1:n) from the left
 *
-            CALL SLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAUQ( I ),
-     $                  A( I, I+1 ), LDA, WORK )
+            IF( I.LT.N )
+     $         CALL SLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAUQ( I ),
+     $                     A( I, I+1 ), LDA, WORK )
             A( I, I ) = D( I )
 *
             IF( I.LT.N ) THEN
@@ -207,8 +208,9 @@
 *
 *           Apply G(i) to A(i+1:m,i:n) from the right
 *
-            CALL SLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, TAUP( I ),
-     $                  A( MIN( I+1, M ), I ), LDA, WORK )
+            IF( I.LT.M )
+     $         CALL SLARF( 'Right', M-I, N-I+1, A( I, I ), LDA,
+     $                     TAUP( I ), A( MIN( I+1, M ), I ), LDA, WORK )
             A( I, I ) = D( I )
 *
             IF( I.LT.M ) THEN
