mirror of
https://github.com/golang/go
synced 2024-11-22 01:44:40 -07:00
bug in [const]
R=r OCL=21569 CL=21569
This commit is contained in:
parent
f38d2b80a4
commit
c9954c63a8
@ -485,7 +485,7 @@ agen(Node *n, Node *res)
|
||||
// constant index
|
||||
if(whatis(nr) == Wlitint) {
|
||||
v = mpgetfix(nr->val.u.xval);
|
||||
if(isptrdarray(nl->type)) {
|
||||
if(isdarray(nl->type)) {
|
||||
|
||||
if(!debug['B']) {
|
||||
n1 = n3;
|
||||
@ -536,7 +536,7 @@ agen(Node *n, Node *res)
|
||||
|
||||
if(!debug['B']) {
|
||||
// check bounds
|
||||
if(isptrdarray(nl->type)) {
|
||||
if(isdarray(nl->type)) {
|
||||
n1 = n3;
|
||||
n1.op = OINDREG;
|
||||
n1.type = types[tptr];
|
||||
@ -552,7 +552,7 @@ agen(Node *n, Node *res)
|
||||
patch(p1, pc);
|
||||
}
|
||||
|
||||
if(isptrdarray(nl->type)) {
|
||||
if(isdarray(nl->type)) {
|
||||
n1 = n3;
|
||||
n1.op = OINDREG;
|
||||
n1.type = types[tptr];
|
||||
|
Loading…
Reference in New Issue
Block a user