mirror of
https://github.com/golang/go
synced 2024-11-24 19:50:18 -07:00
bug 156
R=r OCL=29623 CL=29623
This commit is contained in:
parent
1c7bee0567
commit
fbcbcdbb1d
@ -568,22 +568,17 @@ unary:
|
|||||||
// result will be (a ^ mask)
|
// result will be (a ^ mask)
|
||||||
switch(et) {
|
switch(et) {
|
||||||
default:
|
default:
|
||||||
|
// signed guys change sign
|
||||||
mpmovecfix(&b, -1);
|
mpmovecfix(&b, -1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TINT8:
|
|
||||||
case TINT16:
|
|
||||||
case TINT32:
|
|
||||||
case TINT64:
|
|
||||||
case TINT:
|
|
||||||
et++; // convert to unsigned
|
|
||||||
// fallthrough
|
|
||||||
case TUINT8:
|
case TUINT8:
|
||||||
case TUINT16:
|
case TUINT16:
|
||||||
case TUINT32:
|
case TUINT32:
|
||||||
case TUINT64:
|
case TUINT64:
|
||||||
case TUINT:
|
case TUINT:
|
||||||
case TUINTPTR:
|
case TUINTPTR:
|
||||||
|
// unsigned guys invert their bits
|
||||||
mpmovefixfix(&b, maxintval[et]);
|
mpmovefixfix(&b, maxintval[et]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -104,10 +104,6 @@ BUG should compile
|
|||||||
5 7
|
5 7
|
||||||
BUG: should crash
|
BUG: should crash
|
||||||
|
|
||||||
=========== bugs/bug156.go
|
|
||||||
bugs/bug156.go:7: constant 18446744073709551615 overflows int64
|
|
||||||
BUG: bug156
|
|
||||||
|
|
||||||
=========== fixedbugs/bug016.go
|
=========== fixedbugs/bug016.go
|
||||||
fixedbugs/bug016.go:7: constant -3 overflows uint
|
fixedbugs/bug016.go:7: constant -3 overflows uint
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user