cmd/compile: does not diagnose constant division by zero (original) (raw)

gc produces an error for c and d, but not for a and b:

package a var a = complex64(0)/1e-1000 var b = complex64(0)/1e-47 var c = float32(0)/1e-1000 var d = float32(0)/1e-47

go.go:4: division by zero
go.go:5: division by zero

gotype produces errors for all 4 variables.

go version devel +9b04852 Sat Jul 11 00:08:50 2015 +0000 linux/amd64