Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ALTree opened this issue Apr 10, 2020 · 2 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Apr 10, 2020

$ 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.

@ALTree ALTree added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Apr 10, 2020
@ALTree ALTree added this to the Go1.15 milestone Apr 10, 2020
@ALTree
Copy link
Member Author

ALTree commented Apr 10, 2020

cc @randall77

@randall77 randall77 self-assigned this Apr 10, 2020
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/227860 mentions this issue: cmd/compile: prevent constant folding of +/- when result is NaN

@golang golang locked and limited conversation to collaborators Apr 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

3 participants