mirror of
https://github.com/golang/go
synced 2024-11-19 05:54:44 -07:00
cmd/6g: fix undefined behavior in reg.c
Update #8527 Fixes, cmd/6g/reg.c:847:24: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' LGTM=minux, rsc R=minux, rsc CC=dvyukov, golang-codereviews https://golang.org/cl/129290043
This commit is contained in:
parent
326f48eb9c
commit
afb6221bf7
@ -844,7 +844,7 @@ prop(Reg *r, Bits ref, Bits cal)
|
|||||||
if(v == v1 || ((cal.b[j/32]>>(j&31))&1) == 0) {
|
if(v == v1 || ((cal.b[j/32]>>(j&31))&1) == 0) {
|
||||||
for(; v1 != nil; v1 = v1->nextinnode) {
|
for(; v1 != nil; v1 = v1->nextinnode) {
|
||||||
j = v1 - var;
|
j = v1 - var;
|
||||||
cal.b[j/32] |= 1<<(j&31);
|
cal.b[j/32] |= 1UL<<(j&31);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user