Commit c332ff42 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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
parent 08d3f5e2
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment