]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix internal error on complex comparison
authorLE Manh Cuong <cuong.manhle.vn@gmail.com>
Mon, 24 Jun 2019 07:23:38 +0000 (14:23 +0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 29 Aug 2019 18:24:31 +0000 (18:24 +0000)
commit24c6dd982323949d1a55f8d4e8b0674e45bcf3ce
treecb07fd98cf7f6cc28f1420e084ec191c3b96dc20
parentb136267b87a5004f38665af2bc4237a53c776f0e
cmd/compile: fix internal error on complex comparison

Complex type is the only TIDEAL that lack of support for all comparison
operators. When rewriting constant comparison into literal node, that
missing cause compiler raise an internal error.

Checking the operator is available for complex type before that fix the
problem.

We can make this check works more generally if there's more type lack of
supporting all comparison operators added, but it does not seem to be
happened, so just check explicitly for complex only.

Fixes #32723

Change-Id: I4938b1bdcbcdae9a9d87436024984bd2ab12995e
Reviewed-on: https://go-review.googlesource.com/c/go/+/183459
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/typecheck.go
test/fixedbugs/issue32723.go [new file with mode: 0644]