This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

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



------- 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


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