Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cmd/compile: ICE due to bad ORL constant [1.15] #42753
Ok at tip. Breaks for 1.15 and 1.14.
It seems this isn't a recent regression, it happens even with Go 1.5.4:
Our preference in https://golang.org/wiki/MinorReleases is not to backport, unless it's serious problem with no workaround. Given it's been around for this long, maybe it's not worth taking the risk of doing a backport, unless the fix is very safe. @randall77 Do you think there are reasons that justify doing a backport rather than letting this be a part of the upcoming Go 1.16 release (which will go through additional testing)?
The example isn't a full program, so it won't reproduce with
It looks like this bug started in 1.12 (probably the introduction of bit test instructions). 1.11 and earlier are ok.
This is similar to #41711 which had a backport approved.
As far as seriousness, I think it is an open question. It is an ICE, but a pretty rare one. We only came across it in generated code to test the compiler. It is conceivable that users will hit it, but we have no evidence for how likely that is.
It should never cause the compiler to generate incorrect code.
I don't think there's any easy workaround. You'd have to un-constant some expressions (by putting a constant in a global variable, say) to prevent the compiler optimizations involved. The error doesn't point to an obvious place to do that.
Ah, indeed, go1.5.4 was too old and fails even on simple Go programs for unrelated reasons (not to mention its compiler doesn't support ssa/check/on). Thanks for accurately determining that this regressed in Go 1.12, and providing additional information.
Approving as it is a serious issue without a good workaround. It applies to both 1.15 (this issue) and 1.14 (#42755).
This issue was already fixed at tip. Just adding the test that failed on 1.14/1.15. Update #42753 Change-Id: I00d13ade476b9c17190d762d7fdcb30cf6c83954 Reviewed-on: https://go-review.googlesource.com/c/go/+/272029 Trust: Keith Randall <email@example.com> Run-TryBot: Keith Randall <firstname.lastname@example.org> TryBot-Result: Go Bot <email@example.com> Reviewed-by: David Chase <firstname.lastname@example.org>