Thanks for the comprehensive bug report!
I can not find the line you are incriminating in the srotm.f of 3.2.1.
Line 74 reads:
W = SX(I)
Are you speaking about this line?
(Note: Julie changed srotm.f with SVN revision r691 to remove the ASSIGN
statement (see 0023), but I believe, the problem Leonid is describing
might still be there.)
On Thu, 6 May 2010, Leonid Isaev wrote:
While compiling and testing SVD routines in LAPack 3.2.1, I came across
a fortran runtime error, which complained about BLAS' s(d)rotm.f files. I
FC = gfortran
FFLAGS = -fbounds-check
FC = gfortran
FFLAGS = -fcheck=all
The error message is:
SVD: Testing Singular Value Decomposition routines
./xeigtsts < svd.in > ssvd.out
At line 74 of file srotm.f
Fortran runtime error: Index '2' of dimension 1 of array 'sx' above upper
make: *** [ssvd.out] Error 2
and similar for drotm.f. Apparently, the program performs no bounds check for
the sx(*) array. I think, the situation is similar to something like this:
if ((.false.).and.(sx(2)>0)) then
So, "if" will never work, but the compiler is allowed to evaluate the
condition in the parenthesis, thus sometimes resulting in a segfault, which
would be pretty hard to catch especially in a big application.
I haven't seen similar errors about other BLAS routines, but it does
not mean there aren't any.
PS: I also attach the output from gdb.