Skip to content

cmd/compile: failure to diagnose invalid conversion to complex64 #11590

Description

@dvyukov

gc successfully compiles the following program:

package a
var a = complex64(6)/774516156475830989403545856475830078125

while both gccgo and go/types reject it with:

error: complex real part overflow
774516156475830989403545856475830078125 (untyped int constant) overflows complex64

go version devel +40a1516 Fri Jul 3 03:08:40 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