]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/gc: fix ARM build
authorJosh Bleecher Snyder <josharian@gmail.com>
Fri, 9 Jan 2015 23:16:14 +0000 (15:16 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 9 Jan 2015 23:33:51 +0000 (23:33 +0000)
CL 2520 omitted to set the type for an OCONVNOP node.
Typechecking obviously cannot do it for us.

5g inserts float64 <--> [u]int64 conversions at walk time.
The missing type caused it to crash.

Change-Id: Idce381f219bfef2e3a3be38d3ba3c258b71310ae
Reviewed-on: https://go-review.googlesource.com/2640
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/gc/range.c

index 947b4580ed7cd8c74e45c267f4078bced4f0b61d..55fadae72387c335d331edadb64ad4fabc4f9641 100644 (file)
@@ -185,6 +185,7 @@ walkrange(Node *n)
                                tmp->bounded = 1;
                                tmp = nod(OADDR, tmp, N);
                                tmp = nod(OCONVNOP, tmp, N);
+                               tmp->type = ptrto(types[TUINT8]);
                                n->nbody = list(n->nbody, nod(OAS, hp, tmp));
 
                                // hn = len(a) * sizeof(elem(a))