]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: add shift expression incorrectly rejected by gccgo.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 25 Jun 2013 06:06:34 +0000 (08:06 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 25 Jun 2013 06:06:34 +0000 (08:06 +0200)
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10483045

test/shift2.go

index 88ef3c40f529647ac7a299701e82d2ffb008194e..80e6bbc190da5151fd613269e0d48069bb980110 100644 (file)
@@ -20,6 +20,7 @@ var (
        i       = 1 << s         // 1 has type int
        j int32 = 1 << s         // 1 has type int32; j == 0
        k       = uint64(1 << s) // 1 has type uint64; k == 1<<33
+       l       = g(1 << s)      // 1 has type int
        m int   = 1.0 << s       // legal: 1.0 has type int
        w int64 = 1.0 << 33      // legal: 1.0<<33 is a constant shift expression
 )