mirror of
https://github.com/golang/go
synced 2024-11-22 00:34:40 -07:00
Don't check array bounds if we have been told not to.
Fixes range.go test for 6g. R=rsc CC=golang-dev https://golang.org/cl/189093
This commit is contained in:
parent
08d3f5e271
commit
c332ff42fe
@ -571,7 +571,7 @@ agen(Node *n, Node *res)
|
||||
n1.xoffset = Array_array;
|
||||
gmove(&n1, &n3);
|
||||
} else
|
||||
if(!debug['B']) {
|
||||
if(!debug['B'] && !n->etype) {
|
||||
if(v < 0)
|
||||
yyerror("out of bounds on array");
|
||||
else
|
||||
|
@ -522,7 +522,7 @@ agen(Node *n, Node *res)
|
||||
n1.xoffset = Array_array;
|
||||
gmove(&n1, &n3);
|
||||
} else
|
||||
if(!debug['B']) {
|
||||
if(!debug['B'] && !n->etype) {
|
||||
if(v < 0)
|
||||
yyerror("out of bounds on array");
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user