[Bug fortran/32454] Bounds-check misses overflow of lhs array
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Jul 1 15:16:00 GMT 2010
------- Comment #3 from burnus at gcc dot gnu dot org 2010-07-01 15:16 -------
(In reply to comment #2)
> > Fortran 95. Maybe using:
> > integer, dimension(4) :: y
> > is a better test case.
>
> It is caught at compile time:
> y = [y, (99,i=1,4)]
> 1
> Error: Different shape for array assignment at (1) on dimension 1 (4 and 8)
Not if you write it as:
n = 4
y = [y, (99,i=1,n)]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32454
More information about the Gcc-bugs
mailing list