[Bug fortran/30802] out of bounds error array I/O not picked up with -fbounds-check

tkoenig at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Dec 17 22:23:00 GMT 2007



------- Comment #3 from tkoenig at gcc dot gnu dot org  2007-12-17 22:23 -------
I think the problem is that we don't insert bounds checking
in gfc_conv_expr_descriptor.

Another test case:

$ cat index.f90 
module bar
contains
  subroutine foo(a)
  real, dimension(:) :: a
  a = 3.
  end subroutine foo
end module bar
program main
  use bar
  real, dimension(2,2) :: a
  n = 3
  call foo(a(n,:))
end program main
$ gfortran index.f90 
$ gfortran -fbounds-check index.f90 
$ ./a.out


-- 


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



More information about the Gcc-bugs mailing list