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
Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem. Thanks.
What steps will reproduce the problem?
1. Compile the provided sample
2. Notice the compiler reports a fatal error with some internal messages.
What is the expected output? What do you see instead?
- Correct output woudl be no output, which means the compilation succeeded.
- Instead, I'm getting this:
defn [1002aeb28]
. AS2MAPR l(9) x(-1000000000) tc(1)
. AS2MAPR-list
. . NAME-shortarch G0 u(1) a(1) l(9) class(1) tc(1) string
. . NAME-shortarchOK G0 u(1) a(1) l(9) class(1) tc(1) bool
. AS2MAPR-rlist
. . INDEXMAP l(9) x(-1000000000) tc(1) string
. . . NAME-archmap G0 u(1) a(1) l(6) class(1) tc(1) map[string]
string
. . . NAME-longarch G0 u(1) a(1) l(7) class(1) tc(1) string
map-bug.go:15: fatal error: init1: bad defn
What is your $GOOS? $GOARCH?
GOOS=darwin
GOARCH=amd64
Which revision are you using? (hg identify)
4333:6892511bb0df
Please provide any additional information below.
I'm providing you with a source file that reproduces the problem.
// map-bug.go
package main
import ( "fmt"; "os")
var (
archmap = map[string]string{"Xamd64":"6", "x86":"8", "arm":"5"};
longarch = os.Getenv("GOARCH");
curdir, curdirOK = os.Getwd(); // Here curdirOK is fine
shortarch, shortarchOK = archmap[longarch]; // Here shortarchOK troubles the compiler.
)
func main()
{
fmt.Println("shortarch=" + shortarch);
}
The text was updated successfully, but these errors were encountered:
by malkia:
The text was updated successfully, but these errors were encountered: