]> Cypherpunks repositories - gostls13.git/commitdiff
bug in [const]
authorKen Thompson <ken@golang.org>
Fri, 19 Dec 2008 06:01:46 +0000 (22:01 -0800)
committerKen Thompson <ken@golang.org>
Fri, 19 Dec 2008 06:01:46 +0000 (22:01 -0800)
R=r
OCL=21569
CL=21569

src/cmd/6g/cgen.c

index a56ba7223693b462615ed047dcdccfe7163f0a66..bb5cb246128e91383dbdfa7601248721b1542e0f 100644 (file)
@@ -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];