------- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-08-05 13:42 ------- (In reply to comment #1) > It requires > creating a call to a va_arg function in the front-end, which I would need to > research because I've never done that.
Well, it took more time than I thought, but I did my research... how does this look like? $ cat a.f90 program xcheck implicit none integer :: i,ivec(2) ivec = 0 do i=1,3 if (i**2 < 10) print*,ivec(i) end do end program xcheck $ gfortran a.f90 -fbounds-check && ./a.out 0 0 At line 6 of file a.f90 Fortran runtime error: Array reference out of bounds for array 'ivec', upper bound of dimension 1 exceeded, 3 is greater than 2 -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Keywords| |diagnostic, patch Last reconfirmed|2007-03-23 21:32:11 |2007-08-05 13:42:40 date| | Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31270