golang / go

The Go programming language

Home Page:https://go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gccgo: can shift by complex number

dvyukov opened this issue · comments

gccgo successfully compiles the following program:

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

go/types say:

go.go:2: invalid operation: 0 << complex64(1) (shift count type complex64, must be unsigned integer)

gccgo must unlearn how to shift by complex numbers.

#11567

I should note whatever changes fixes #11616, should also fix this.

#11616 is fixed.