Skip to content

Commit 57b267c

Browse files
committed
fixing compilation errors due to not checking for lastc=0
1 parent 5953353 commit 57b267c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

SRC/dlarf1f.f

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,13 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
175175
* .. Parameters ..
176176
DOUBLE PRECISION ONE, ZERO
177177
PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
178-
INTEGER IONE
179-
PARAMETER ( IONE = 1 )
180178
* ..
181179
* .. Local Scalars ..
182180
LOGICAL APPLYLEFT
183181
INTEGER I, LASTV, LASTC
184182
* ..
185183
* .. External Subroutines ..
186-
EXTERNAL DGEMV, DGER
184+
EXTERNAL DGEMV, DGER, DAXPY, DSCAL
187185
* ..
188186
* .. External Functions ..
189187
LOGICAL LSAME
@@ -211,7 +209,7 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
211209
! Look for the last non-zero row in V.
212210
! Since we are assuming that V(1) = 1, and it is not stored, so we
213211
! shouldn't access it.
214-
DO WHILE( LASTV.GE.2 .AND. V( I ).EQ.ZERO )
212+
DO WHILE( LASTV.GT.1 .AND. V( I ).EQ.ZERO )
215213
LASTV = LASTV - 1
216214
I = I - INCV
217215
END DO
@@ -223,6 +221,9 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
223221
LASTC = ILADLR(M, LASTV, C, LDC)
224222
END IF
225223
END IF
224+
IF( LASTC.EQ.0 ) THEN
225+
RETURN
226+
END IF
226227
IF( APPLYLEFT ) THEN
227228
*
228229
* Form H * C

SRC/dlarf1l.f

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ SUBROUTINE DLARF1L( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
142142
* .. Parameters ..
143143
DOUBLE PRECISION ONE, ZERO
144144
PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
145-
INTEGER IONE
146-
PARAMETER ( IONE = 1 )
147145
* ..
148146
* .. Local Scalars ..
149147
LOGICAL APPLYLEFT
@@ -184,8 +182,9 @@ SUBROUTINE DLARF1L( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
184182
LASTC = ILADLR(M, LASTV, C, LDC)
185183
END IF
186184
END IF
187-
! Note that lastc.eq.0 renders the BLAS operations null; no special
188-
! case is needed at this level.
185+
IF( LASTC.EQ.0 ) THEN
186+
RETURN
187+
END IF
189188
IF( APPLYLEFT ) THEN
190189
*
191190
* Form H * C

0 commit comments

Comments
 (0)