compiler: Allow string slices with start index == length.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Aug 2015 20:31:51 +0000 (20:31 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Aug 2015 20:31:51 +0000 (20:31 +0000)
commitb10f32fb7bf113fda70c7b0e8f64d2c73cf05a9c
tree7fbced9827c20185a4d4e974394081364996d9a4
parent9e6bcade584171839b8e1d11babd2c49fd1611cb
compiler: Allow string slices with start index == length.

    Avoid an off-by-one error when checking the start index of a string
    slice by allowing the start index to be the string length instead
    of the string length - 1.

    Fixes golang/go#11522.

    Reviewed-on: https://go-review.googlesource.com/13030

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227191 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc