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

--- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> 
2011-10-14 13:58:21 UTC ---
> Well, in this example "size" is 3, hence, w[size -1] == w[2]. In Fortran, the
> "w" is the last argument, which is 2 and thus "d(2)" == "d(1:2)" has two
> elements. And indeed, accessing w[2] is a bit dangerous if one has just two
> elements ...

As far as I understand C, w[2] is the third element of w, isn't it? The test
succeeds if I replace d(2) with d(3) or d(0:2).

Reply via email to