This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FW: Should bugs in the runtime support be reported via the gcc bugzilla mechanism?


On Tue, 2008-06-10 at 14:40 -0400, Laritz, Thomas wrote:

> In ksh, with gcc 4.1.0, when I (at the ksh prompt)

This version is really, really old.

Please upgrade; the recommended version of gfortran is 4.3.1.

A newer version has:

$ cat > foo.f90
       real x(10)
       x(11) = 33
       end
$ gfortran foo.f90
foo.f90:2.9:

       x(11) = 33
        1
Warning: Array reference at (1) is out of bounds (11 > 10) in dimension
1

(which is caught at compile-time).

To change the program a bit:

$ cat foo.f90
       real x(10)
       x(11) = 33
       end
$ gfortran -fbounds-check foo2.f90
$ ./a.out
At line 4 of file foo2.f90
Fortran runtime error: Array reference out of bounds for array 'x',
upper bound of dimension 1 exceeded (11 > 10)

which should be pretty clear.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]