Skip to content

Commit 114bbbc

Browse files
authored
Merge pull request #3212 from martin-frbg/lapack463
Initialize X and Y to zero for N=0 in xGGGLM (Reference-LAPACK PR463)
2 parents b67a92c + c26780d commit 114bbbc

File tree

4 files changed

+36
-8
lines changed

4 files changed

+36
-8
lines changed

lapack-netlib/SRC/cggglm.f

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,15 @@ SUBROUTINE CGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
271271
*
272272
* Quick return if possible
273273
*
274-
IF( N.EQ.0 )
275-
$ RETURN
274+
IF( N.EQ.0 ) THEN
275+
DO I = 1, M
276+
X(I) = CZERO
277+
END DO
278+
DO I = 1, P
279+
Y(I) = CZERO
280+
END DO
281+
RETURN
282+
END IF
276283
*
277284
* Compute the GQR factorization of matrices A and B:
278285
*

lapack-netlib/SRC/dggglm.f

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,15 @@ SUBROUTINE DGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
270270
*
271271
* Quick return if possible
272272
*
273-
IF( N.EQ.0 )
274-
$ RETURN
273+
IF( N.EQ.0 ) THEN
274+
DO I = 1, M
275+
X(I) = ZERO
276+
END DO
277+
DO I = 1, P
278+
Y(I) = ZERO
279+
END DO
280+
RETURN
281+
END IF
275282
*
276283
* Compute the GQR factorization of matrices A and B:
277284
*

lapack-netlib/SRC/sggglm.f

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,15 @@ SUBROUTINE SGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
270270
*
271271
* Quick return if possible
272272
*
273-
IF( N.EQ.0 )
274-
$ RETURN
273+
IF( N.EQ.0 ) THEN
274+
DO I = 1, M
275+
X(I) = ZERO
276+
END DO
277+
DO I = 1, P
278+
Y(I) = ZERO
279+
END DO
280+
RETURN
281+
END IF
275282
*
276283
* Compute the GQR factorization of matrices A and B:
277284
*

lapack-netlib/SRC/zggglm.f

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,15 @@ SUBROUTINE ZGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
271271
*
272272
* Quick return if possible
273273
*
274-
IF( N.EQ.0 )
275-
$ RETURN
274+
IF( N.EQ.0 ) THEN
275+
DO I = 1, M
276+
X(I) = CZERO
277+
END DO
278+
DO I = 1, P
279+
Y(I) = CZERO
280+
END DO
281+
RETURN
282+
END IF
276283
*
277284
* Compute the GQR factorization of matrices A and B:
278285
*

0 commit comments

Comments
 (0)