------- Comment #3 from kargl at gcc dot gnu dot org 2010-04-15 16:28 -------
Looking at the -ftree-dump-original output for the code
in comment #1 finds,
if ((logical(kind=4)) __builtin_expect (a.dim[1].ubound < D.1545, 0))
{
_gfortran_runtime_error_at (&"At line 11 of file a.f90"[1]{lb:1 sz:1},
&"Index \'%ld\' of dimension 2 of array \'t\' outside of expected
range (%ld:%ld)"[1]{lb: 1 sz: 1}, (<unnamed-signed:32>) D.1545,
(<unnamed-signed:32>) a.dim[1].lbound, (<unnamed-signed:32>)
a.dim[1].ubound);
}
which shows the correct bounds for 'a' are being checked, but
the wrong variable name 't' is inserted in error message. Note,
this code fragment occurs during the actual act of assignment.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30073