------- Comment #4 from dominiq at lps dot ens dot fr 2009-04-25 16:30 ------- > But bounds checking on the other compilers I have access to doesn't show any > problem
Are you sure about that? If you use bound-checking on any compiler supporting it, you should get an error (at least a warning). > I was hoping gfortran can be smarter in > this situations like this, and use just the first portion of the array on the > right side that fits the shape of the array section on the left of the > assignment statement. Again, I don't think any compiler is smart with this respect. If one is, it should emit a warning about the use of the extension. Now as I said in comment #2, on i686-apple-darwin9 the invalid and valid codes give the same output, but it is not because gfortran is smarter on this platform than on yours, but only because the memory layouts are different and that the extra data are written on i686-apple-darwin9 in a place that does not cause a problem. Final note, you should close this pr as invalid, TIA. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39894