]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: add a couple of cases to const1.go that crashed gccgo
authorIan Lance Taylor <iant@golang.org>
Thu, 1 Mar 2012 01:39:02 +0000 (17:39 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 1 Mar 2012 01:39:02 +0000 (17:39 -0800)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5713045

test/const1.go

index f944cde96e2a4fb4c8efbe3eb83814e4628a83f7..bc399c01c5bff243f7f819d4d5ca4f5200369e32 100644 (file)
@@ -43,7 +43,9 @@ var (
        b3        = Uint8 - Uint8         // OK
        b4        = Uint8 - Uint8 - Uint8 // ERROR "overflow"
        b5        = uint8(^0)             // ERROR "overflow"
+       b5a       = int64(^0)             // OK
        b6        = ^uint8(0)             // OK
+       b6a       = ^int64(0)             // OK
        b7        = uint8(Minus1)         // ERROR "overflow"
        b8        = uint8(int8(-1))       // ERROR "overflow"
        b8a       = uint8(-1)             // ERROR "overflow"