---------- Forwarded message ----------
Date: Sun, 10 May 2009 14:59:05 -0600
Subject: [Lapack SVN] r659 - in /lapack/trunk/SRC: ctgsen.f ztgsen.f
Author: langou
Date: Sun May 10 16:59:05 2009
New Revision: 659
URL: https://icl.cs.utk.edu/trac/lapack-dev/changeset/659
Log:
[[ I did not really want to commit the previous commit, this is the follow-up
commit ... ]]
Bug report sent by Alexander V. Kobotov (from Intel) on Mon, 6 Apr 2009 to
"lapack@Domain.Removed".
"(d/s)tgsen.f: iwork(1) always referenced: line 455: iwork( 1 ) = LIWMIN,
documentation says that if IJOB=0 it shouldn't, so NULL pointer causes a
sigfault."
(There is indeed the same problem for the WORK array and the IWORK array in the
complex routines.)
I have changed the header of the routines ctgsen.f, dtgsen.f, stgsen.f, and
ztgsen.f. A Fortran array needs to be of size at least 1. So IWORK is of size
at least 1. It was indeed written in the header of the routine:
"IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))"
So since IWORK is of size at least 1, there is no reason not to reference it.
When there is a workspace query with IJOB.EQ.0, WORK(1) and IWORK(1) are both
set to 1.
Modified:
lapack/trunk/SRC/ctgsen.f
lapack/trunk/SRC/ztgsen.f
Modified: lapack/trunk/SRC/ctgsen.f
URL:
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/SRC/ctgsen.f?rev=659
==============================================================================
--- lapack/trunk/SRC/ctgsen.f (original)
+++ lapack/trunk/SRC/ctgsen.f Sun May 10 16:59:05 2009
@@ -155,8 +155,7 @@
* If IJOB = 0 or 1, DIF is not referenced.
*
* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* IF IJOB = 0, WORK is not referenced. Otherwise,
-* on exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= 1
Modified: lapack/trunk/SRC/ztgsen.f
URL:
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/SRC/ztgsen.f?rev=659
==============================================================================
--- lapack/trunk/SRC/ztgsen.f (original)
+++ lapack/trunk/SRC/ztgsen.f Sun May 10 16:59:05 2009
@@ -155,8 +155,7 @@
* If IJOB = 0 or 1, DIF is not referenced.
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* IF IJOB = 0, WORK is not referenced. Otherwise,
-* on exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= 1
|