------- Comment #2 from fxcoudert at gcc dot gnu dot org  2007-08-06 21:13 
-------
It's not about being allocatable, it's the I/O operation that doesn't perform
the necessary check:

$ cat a.f90
  real :: x(2,2)
  x = 0.
  print *, x(5,:)
  x(5,:) = 1.
end
$ gfortran -fbounds-check a.f90 && ./a.out
   0.000000      5.8787666E-39
At line 4 of file a.f90
Fortran runtime error: Array reference out of bounds for array 'x', upper bound
of dimension 1  exceeded


-- 


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

Reply via email to