You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The linked branch is the code that triggers the panic.
After I saw the panic I tried with Go versions 1.22.3 and gotip. Both of these versions work. I also tested with 1.21.7 and with the removal of some 1.22.x specific features that worked okay too.
The problem seems specific to 1.22.0
The project can be compiled with go build . but note that there are some cgo requirements.
What did you see happen?
Wben compiling with go build . the compiler panics with the following message.
# github.com/jetsetilly/gopher2600/hardware
hardware/vcs.go:242:2: internal compiler error: panic: interface conversion: types.Object is nil, not *ir.Name
Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
The code at the quoted location is the last element of a const block. If I remove a replace instances of the consts with actual values, the panic moves to a different location.
What did you expect to see?
I expected the project to compile and to produce a single binary.
I would like to produce a smaller, compile-able example that exhibits the problem. But given the nature of the problem and it being unclear where the problem code is, that seems unlikley.
The text was updated successfully, but these errors were encountered:
Looks like #67016 which is fixed on tip; the fix was also backported to 1.22.3. I suggest upgrading your Go version.
Thanks. I've tested with 1.22.3 and indeed, the bug does not occur. I asked in the golang-dev mailing list and they said to raise a new issue. I suppose they want to be sure that it is the same bug.
But yes, that does look like the same bug. I was refactoring when this panic arose
Go version
1.22.0
Output of
go env
in your module/workspace:What did you do?
Compilation of this project. https://github.com/JetSetIlly/Gopher2600/tree/compiler_panic_go1_22_0
The linked branch is the code that triggers the panic.
After I saw the panic I tried with Go versions 1.22.3 and gotip. Both of these versions work. I also tested with 1.21.7 and with the removal of some 1.22.x specific features that worked okay too.
The problem seems specific to 1.22.0
The project can be compiled with
go build .
but note that there are some cgo requirements.What did you see happen?
Wben compiling with
go build .
the compiler panics with the following message.The code at the quoted location is the last element of a const block. If I remove a replace instances of the consts with actual values, the panic moves to a different location.
What did you expect to see?
I expected the project to compile and to produce a single binary.
I would like to produce a smaller, compile-able example that exhibits the problem. But given the nature of the problem and it being unclear where the problem code is, that seems unlikley.
The text was updated successfully, but these errors were encountered: