------- Comment #8 from burnus at gcc dot gnu dot org  2010-04-16 17:24 -------
(In reply to comment #7)
> Assuming 'i = -4' is missing in the programming

Well, almost any number would do, but "i = -4" is fine.

> why is the runtime bounds check not a sufficient error message?

Because:

  Fortran runtime error: Array bound mismatch for dimension 1 of array 'f'

is less helpful than our other gfortran out-of-bounds error messages; to be in
line with those, one should have:

  Fortran runtime error: Array bound mismatch for dimension 1 of array 'f'
(5/2)

or something like that which should also the two extends. Knowing the extends
it can make it sometimes much easier to find the cause of the wrong extend.

In the comment of comment 5 you see how other gfortran errors look like
"(%d/%d)" and how the NAG error message looks like for this case ("extent 5
instead of 2").


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31538

Reply via email to