I received the run time error message "upper bound of dimension 1 exceeded". I initially thought that I had an array with an upper bound of 1, and that the array index was larger than that. I now think that the error message tells me that I have a rank-2 array, and that the upper bound of the first rank was exceeded. The error message could be improved to read "rank 1" or "index 1" instead.
"dimension 1" means to me, the first dimension. I don't see why it was not hard to understand, in fact I did not read the rest of your message until I already said to myself this was the first dimension.
I looked what other are writing: ---------------- gfortran: Fortran runtime error: Array reference out of bounds for array 'r', upper bound of dimension 1 exceeded (in file 'array2.f90', at line 4) NAG f95: Subscript 1 of R (value 5) is out of range (1:4) Intel Fortran Compiler ifort: forrtl: severe (408): fort: (2): Subscript #1 of the array R has value 5 which is greater than the upper bound of 4 Sun f95: ****** FORTRAN RUN-TIME SYSTEM ****** Subscript out of range. Location: line 4 column 5 of 'array2.f90' Subscript number 1 has value 5 in array 'R' ---------------- Personal favourite would be: Fortran runtime error: Array reference out of bounds. Subscript 1 of array 'r' (value 5) exceeds upper bound of 4 (in file 'array2.f90', at line 4)" The place to change would be trans-array.c. I looked at it, but I fail to extract a asprintf-able number from the "tree"s index etc.
As FX wrote in an email, a more-detailed error message can not be given with the current method: at present the error string is constructed at compile time via asprintf, but then the extend of the array might not be known - and the current value neither. One needs therefore to replace the current code by something which calls the library.
(In reply to comment #3) > One needs therefore to replace the current code by something which calls the > library. This was done, and the current error message was corrected.