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

compiler crash in complicated map assignment #687

Closed
rsc opened this issue Mar 22, 2010 · 3 comments
Closed

compiler crash in complicated map assignment #687

rsc opened this issue Mar 22, 2010 · 3 comments

Comments

@rsc
Copy link
Contributor

rsc commented Mar 22, 2010

mini=; cat x.go
package main

import "strconv"

func f() string
func g() string

func main() {
    m := make(map[string]int)
    m[f()], _ = strconv.Atoi(g())
}
mini=; 6g x.go
typecheck [100876c80]
.   INDREG a(1) l(10) x(16) tc(2) strconv.i G0 int
x.go:10: fatal error: typecheck INDREG
mini=;
@rsc
Copy link
Contributor Author

rsc commented Mar 22, 2010

Comment 1:

and another
> $ cat x.go
> package main
> func main() {
> data := make(map[int]string, 1)
> data[0] = "hello, "
> data[0] += "world!"
> }

@rsc
Copy link
Contributor Author

rsc commented Mar 22, 2010

Comment 2:

Labels changed: added priority-high.

@rsc
Copy link
Contributor Author

rsc commented Mar 23, 2010

Comment 3:

This issue was closed by revision 4408659.

Status changed to Fixed.

@rsc rsc added fixed labels Mar 23, 2010
@rsc rsc self-assigned this Mar 23, 2010
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants