Skip to content

cmd/compile: does not diagnose constant division by zero #11674

Description

@dvyukov

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions