Skip to content

cmd/compile: internal compiler error: can't encode a NaN in AuxInt field #38359

Closed
@ALTree

Description

@ALTree
$ gotip version
go version devel +782fcb44b9 Fri Apr 10 09:38:07 2020 +0000 linux/amd64

The following program:

package p

func f() {
	var st struct {
		f    float64
		_, _ string
	}

	f := 1e308
	st.f = 2*f - 2*f
}

crashes the tip compiler with this error:

$ gotip build crash.go

# command-line-arguments
./crash.go:11:1: internal compiler error: 'f': panic during opt while compiling f:

can't encode a NaN in AuxInt field

It compiles fine with Go 1.14.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.release-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions