On 31-Oct-2007, John Swensen wrote:
| OK...this may be one of the strangest result I have ever seen. In the
| conftest.f file generated for the BLAS calling convention test, there
| are the following lines:
| 10 continue
| retval = zdotu (n, zx, incx, zy, incy)
| Now, since I couldn't seem to get meaningful information from GDB, I
| decided to use the time tested debug practice of littering the file with
| print statements to see how far along it was getting. After messing
| around a little, I discovered that if I put a print statement between
| the two lines mentioned above, namely:
| 10 continue
| print *, ''
| retval = zdotu (n, zx, incx, zy, incy)
| that the illegal instruction error went away and it printed out:
| <empty line>
| succeeded
|
| I have never really programmed in fortran, but this seems like some sort
| of compiler bug.
Or just that you are seeing unpredictible results because the call to
zdotu is compiled using one convention for returning complex values
from a function and the library that provides zdotu is compiled using
another convention? If the code is writing over the stack in some
way, then I think the fact that the behavior changes when you insert
print statements is not too surprising.
What is the value of retval after the call? Is it really correct?
jwe