Commit c9954c63 authored by Ken Thompson's avatar Ken Thompson

bug in [const]

R=r
OCL=21569
CL=21569
parent f38d2b80
...@@ -485,7 +485,7 @@ agen(Node *n, Node *res) ...@@ -485,7 +485,7 @@ agen(Node *n, Node *res)
// constant index // constant index
if(whatis(nr) == Wlitint) { if(whatis(nr) == Wlitint) {
v = mpgetfix(nr->val.u.xval); v = mpgetfix(nr->val.u.xval);
if(isptrdarray(nl->type)) { if(isdarray(nl->type)) {
if(!debug['B']) { if(!debug['B']) {
n1 = n3; n1 = n3;
...@@ -536,7 +536,7 @@ agen(Node *n, Node *res) ...@@ -536,7 +536,7 @@ agen(Node *n, Node *res)
if(!debug['B']) { if(!debug['B']) {
// check bounds // check bounds
if(isptrdarray(nl->type)) { if(isdarray(nl->type)) {
n1 = n3; n1 = n3;
n1.op = OINDREG; n1.op = OINDREG;
n1.type = types[tptr]; n1.type = types[tptr];
...@@ -552,7 +552,7 @@ agen(Node *n, Node *res) ...@@ -552,7 +552,7 @@ agen(Node *n, Node *res)
patch(p1, pc); patch(p1, pc);
} }
if(isptrdarray(nl->type)) { if(isdarray(nl->type)) {
n1 = n3; n1 = n3;
n1.op = OINDREG; n1.op = OINDREG;
n1.type = types[tptr]; n1.type = types[tptr];
......
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