I had already reported this kind of bug (for DGELSD) by mail a few months ago, but it could not be reproduced (by Julien Langou), and I did not have time to follow up.

Since I have run across it again with DGESDD, I have investigated it more closely, and am still able to reproduce it with DGELSD, too:

When an optimum workspace query is requested by passing "-1" as argument for LWORK, both functions return sizes that are often smaller than the minimum workspace size as defined by the formulas in the documentation. I am able to reproduce this on Linux (i686) with the latest LAPACK-rpm for Fedora Core 3 (lapack-3.0-28).