golang/go

gccgo: can shift complex numbers

dvyukov opened this issue · 2 comments

gccgo successfully compiles the following program:

package a
var a = complex64(1) << 2

gc rejects it saying:

invalid operation: complex64(1) << 2 (shift of type complex64)

Spec says that lhs of shift must be an integer.
Similar issue for go/types #11594

gcc version 6.0.0 20150702 (experimental) (GCC)

CL https://golang.org/cl/13688 mentions this issue.