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 target/50721] [4.6/4.7 Regression] Segfault of -O0 compiled program on x86_64 related to register allocator


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


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