After floundering around for some time with buggy compilers, I find that one
of my major problems with MATMUL() is that no two compilers give the same
result for multiplication of a zero sized rank 1 array by a rank 2 array. All
the compilers I've tried give a zero result for DOT_PRODUCT of zero sized
arrays; however, if I construct a MATMUL() to calculate an array of such dot
products, I find the results:
Lahey f90 gives an array of zero elements, as desired
HPUX f90 crashes the program, with error trace, and hangs the terminal
SGI f90 7.2 gives an array of garbage numbers, presumably calculated from some
neighboring values in memory.
I don't find anything on this point in textbooks such as Adams, Brainerd et
al.
Is this a point which the standard leaves open to such individual treatment,
another "quality of implementation" issue?
Tim Prince
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|